I’m stuck here:
I want to select all divs with attribute data-role=”page” which do not carry an data-internal-page=”true” attribute.
This does not work:
$('div:jqmData(role="page")').not('div:jqmData(internal-page="true")')
Can someone tell me what’s wrong in the syntax? The 2nd attribute is always disregarded.
Thanks for help!
I don’t use
jqmDatabut it is possible that it doesn’t look-up alldata-attributes but only the ones associated with jQuery Mobile. Try using regular attribute selectors:Here is a demo: http://jsfiddle.net/Y4mxw/
Note that your selectors will run faster if you don’t use the tagName: