Adding id to pages in jquery mobile

54 views Asked by At

For internal linking in jquery mobile, I seem to need adding unique id to each page div so that I can handle each page separately. Since the page div itself is being generated by jquery mobile dynamically, what is the best practice to add dynamic id to those divs?

Edit: Currently I am requesting new page as follows:

$(document).on("swipeleft", function () {
    nextpage = GetNextPage();
    $.mobile.pageContainer.pagecontainer("change", nextpage, { changeHash: true });
});

where nextpage is a dynamic url. I use this approach to allow paging.

0

There are 0 answers