I am making an app with jQuery Mobile and PhoneGap. I noticed that when I link with $.mobile.changePage() I have some issues with pageinit event. It is called several times, but after some time, for example after 15 redirects it stops working.
I had no problems when I changed linking to window.location.href = (). Unfortunately I need transistions, but this method doesn’t provide it.
You should be careful as to where you bond your events. Jquery mobile handles page changing in such a way that is does not “reset” the events binding when you change page, as would occur on a more traditional changepage. Because of that, if you event binding is called every time the page is loaded, then the bound function will be called as many times as the page has already been loaded, which will increase with each navigation.
I usually bind all my pageinit events in the header of my page.
As headers are only loaded on the initial page by jquery mobile, you ensure this way that the binding will only be done once.