Lamar
Lamar

Reputation: 1849

Adding id to pages in jquery mobile

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.

Upvotes: 0

Views: 52

Answers (0)

Related Questions