Is it possible to select elements in jQuery by their HTML5
data attributes (for example, all
They are handled specially in consumption by jQuery, e.g. allowing
.data() to fetch from them with correct typing…but as far as DOM traversal goes, they’re just another attribute, so think of them as such when writing selectors.
This simply uses the the
There are several attribute selectors you can use (among the others).
jQuery Mobile recomends the $.fn.jqmData(), for example : $(“div:jqmData(role=’footer’)”)
jQuery & Zepto integration: https://github.com/kossnocorp/role