Jquery Mobile - $(document).ready not firing

后端 未结 2 1210
南笙
南笙 2021-01-19 07:15

So I have a listview in which each component wired to an on click function which looks like this:

function launchNewPage() {
    $.mobile.changePage( \"newPa         


        
2条回答
  •  無奈伤痛
    2021-01-19 07:21

    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";
    });
    

提交回复
热议问题