I am making a jQueryMobile and PhoneGap app. I need to call ajax in page init. Unfortunately it never fires:
$("#kontakty").bind('pageinit', function() {
is in the file with:
<div data-role="page" id="kontakty">
When navigating from page A.html to kontakty.html, my event is not fired. I tried replacing bind with live, but no success. I also tried pageshow, pageinit, pagechange... and all methods form jQM docs.
The weird thing is that, when I change "#kontakty" with document, it works. But I cannot make it permament, because it calls with every other .html file I do open (it is not good).
Thanks in advance.