Reputation: 22277
I'm unable to select page contents through class in jQueryMobile.
$('div[data-role="content"]');
works fine
$('div.ui-content');
only selects a few
Upvotes: 0
Views: 488
Reputation: 16905
jQuery Mobile adds the class when it enhances the page. You might be calling the selector before the enhancement is done (I won't guess no more, it's your app ;) )
the correct way to get all the content nodes is:
$("div:jqmData(role='content')")
Upvotes: 2
Reputation:
You should omit the blank, not
$('div .ui-content');
but
$('div.ui-content');
Upvotes: 0