'pageshow' is not received when pressing “back” button on Safari on *IPad"

前端 未结 6 1435
终归单人心
终归单人心 2020-12-01 11:08

I have the following handler:

        $(window).bind(\'pageshow\', function() { alert(\"back to page\"); });

When I navigate away from the

6条回答
  •  温柔的废话
    2020-12-01 12:01

    I solved that issue like that;

    $(window).bind("pageshow", function () {
    
        setTimeout(function () {
            back();
        }, 1000);
    
    });
    
    function back() {
       //YOUR CODES
    }
    

提交回复
热议问题