Using jQuery Mobile with Web-SQL and dynamicly generated content

Using jQuery Mobile with Web-SQL and dynamicly generated content

Hi, i've started to convert an old webapp to jQuery mobiel today and it's going pretty good but i have som questions about how to best use jQuery Mobile combined with the webkit Web-SQL database.

This webapp is supposed to be a offline capable iphone app, so i'm forced to use only JS/HTML. My page works like this:

on my startpage i append a list of links generated from the DB to the main div[data-role=content]. and when you press one of the links i want to display the data on a new page.

What i did at first was to hav all the links link to the same div (#round), and on the click-event generate the content to the div, this worked on alpha 1 on desktop chrome and safari, but not on mobile safari (it shows the #round div but does not hide the main div, and the loader-spinner doesn't hide) sam thing happend on desktop safari on alpha2.

i also tried change page with the $.mobile.changePage()-method after the data was generated, but that breaks the back button (since i haven't found any way to prevent the default-operation when the links are clicked).

another problem (although it's not a big one) is that you can't bookmark a subpage generated by any of the methods above since it's not automatically generated by by jQuery Mobile.

What would you suggest be the best way to do this? i guess there isn't any way to pass variables to a page or div with a regular link?