html5 - accessing tab content across various pages jquery mobile -
i using jquery mobile in application. earlier, using single page , navigating across page using hash tags planning break multiple pages. better approach,i.e. use tags or make separate files ?
and after separating html file multiple how access contents of tags data-role="page"? earlier using # tag search within pages.
from point of navigation use file name instead of page #. difference.
which solution better depend on trying do. if creating hybrid mobile app phonegap go single html file / multiple pages approach. if creating mobile version of site use multiple html approach.
from point of content access nothing changing @ all. still use page id access content.
for example, if have made transition page index.html second.html , second.html has page id second. access content with:
$('#second [data-role="content"]').....
basically if dont count navigation nothing else change. content still loaded dom.
edit :
i forgot, 1 thing change. in case of multiple html files solution, first page loaded normally. head , body loaded dom, , there await other content. when second page loaded, body content loaded dom. need worry this. if want find more take @ other answer: why have put script index.html in jquery mobile
Comments
Post a Comment