android - Data-Theme not applying to Subpage - JQuery mobile and Phonegap -


i trying develop in application, based on phonegap , jquery mobile framework.

i have created page , sub page separate html files.

the body part of index.html file like:

<div data-role="page" id="p1" **data-theme="e"**> <div data-role="header">app name</div> <div data-role="content" class="fit-content"><br/> <ul data-role="listview" data-inset="true" data-filter="true"  data-icon="star" data-iconpos="right" data-transition="slide"> <li><a href="page2.html#p2" rel="external">link1</a></li> <li><a href="page3.html#p3" rel="external">link2</a></li> </ul></div></div> 

the body part of page2.html file like:

<div data-role="subpage" id="p2" **data-theme="e"**> <div data-role="header">places</div> <div data-role="content" class="fit-content"><br/> <ul data-role="listview" data-inset="true" data-filter="true"  data-icon="star" data-iconpos="right" data-transition="slide"> <li><a href="index.html#p1" rel="external">go back</a></li> </ul></div></div> 

the data-theme="e" getting applied index.html, whereas not getting applied page2.html. can please provide me reasons, behavior..?

i using jquery 1.8.3 , jquery mobile 1.2.1 version , calling css , js versions from local storage in both html files (ex: /android_asset/www/css/jquery.mobile-1.2.1.css, ex: /android_asset/www/js/jquery-1.8.3.js/)

  • also, question lingering in mind is, unable call click event link1, when keep body content of page2.html in same html file index.html, subpage; upon click on link1, not redirected page2.html, though give href="#p2", instead of href-"page2.html#p2".

provide data-ajax="false" in list divider of index.html. tells framework full page reload clear out ajax hash in url. per this link,

"providing data-ajax="false" critical because ajax pages use hash (#) track ajax history, while multiple internal pages use hash indicate internal pages there conflicts."

also, rename data-role="subpage" data-role="page". solution problem.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -