Skip to content Skip to sidebar Skip to footer

Jquery Mobile - $(document).ready Not Firing

So I have a listview in which each component wired to an on click function which looks like this: function launchNewPage() { $.mobile.changePage( 'newPage.html', { transition:

Solution 1:

You cannot start the jQuery mobile with $(document).ready() you should started like this:

try to work with this in the first HTML

$("div[data-role*='page']").live('pageshow', function(event, ui) { 
    document.location.href="newPage.html";
});

Solution 2:

Geoff, if you are using the Beta 3 version of the JQM framework, read this. It will help shed light on the DOM and $(document).ready(). You may want to consider the "pagecreate" and "pagebeforecreate" events. They are delineated in the doc referenced in the above link.

Post a Comment for "Jquery Mobile - $(document).ready Not Firing"