pageShow event in javascript

后端 未结 10 887
不知归路
不知归路 2020-12-10 05:21

I have the following code:



    
    

        
10条回答
  •  执念已碎
    2020-12-10 05:59

    Your jQuery code never gets executed. You should run it from within jQuery's "ready" event:

    $( function() {
        $('#mypage').live('pageshow', function (event, ui) {
            alert('This page was just hidden: ' + ui.prevPage);
        });
    });
    

提交回复
热议问题