开发者

Unable to select page contents through class in jQueryMobile

I'm unable to select page contents through class in jQueryMobile.开发者_如何学JAVA

$('div[data-role="content"]'); works fine

$('div.ui-content'); only selects a few


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')")


You should omit the blank, not

$('div .ui-content');

but

$('div.ui-content');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜