Events fired on page load: ajax vs external?
Hi!
Is the "pagecreate" event supposed to be fired on page load, no matter if the page is loaded via an ajax call or called straight via the URL?
If not, is there another way to go about knowing when jqm is initialized and done?
Background: I'm trying out jqm on a site prototype I'm building, and I'm having trouble calling functions dealing with dynamically manipulating the DOM: I'm calling .listview('refresh') in some places, and my script fails, complaining about doing so before jqm has finished initializing. I then switched from calling the function doing the initialization/page setup from on $(document).ready([...]) to on $('div[data-role=page]).live('pagecreate', [...]) - that works, but only on pages loaded via ajax, not if I use the URL to the page directly.