Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jQuery.data() vs. jQuery().data() should be more clear #64

Closed
dieseltravis opened this issue Sep 28, 2012 · 0 comments
Closed

jQuery.data() vs. jQuery().data() should be more clear #64

dieseltravis opened this issue Sep 28, 2012 · 0 comments

Comments

@dieseltravis
Copy link

I think it just needs a bit of documentation that elem is a DOM element, not a jQuery object. Also it should be noted that using jQuery.data(domElem, "key") will not pull in the HTML5 data-* attribute data-key="value" like calling jQuery(domElem).data("key") would.

Here's an example showing how they fail:
http://jsbin.com/exapef/1/edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant