指向Jquery Mobile的特定页面
在jquerymobile2页面中,当试图触发此事件时,输入DOM(一个隐藏的DOM)指向Jquery Mobile的特定页面,jquery,jquery-mobile,Jquery,Jquery Mobile,在jquerymobile2页面中,当试图触发此事件时,输入DOM(一个隐藏的DOM) $(document).delegate('div[data-role=page]', 'pagebeforeshow', function (e, data) { 我猜是因为这个原因,它从不开火。幸运的是,在我的情况下,两个页面都有不同的ID。如何将此事件更改为在id为“AppPage”的页面上触发 我想您可能想试试: $( '#AppPage' ).live( 'pagebeforeshow',func
$(document).delegate('div[data-role=page]', 'pagebeforeshow', function (e, data) {
我猜是因为这个原因,它从不开火。幸运的是,在我的情况下,两个页面都有不同的ID。如何将此事件更改为在id为“AppPage”的页面上触发
我想您可能想试试:
$( '#AppPage' ).live( 'pagebeforeshow',function(){
alert( "Before showing the page AppPage");
});
有关更多信息,请查看在线文档:
让我知道这就是你要找的
$( '#AppPage' ).live( 'pagebeforeshow',function(){
alert( "Before showing the page AppPage");
});