jQuery mobile pageinit赢得';过渡后不会发生
第1页:jQuery mobile pageinit赢得';过渡后不会发生,jquery,html,jquery-mobile,Jquery,Html,Jquery Mobile,第1页: 页面会滑动,但不会执行Page2中的脚本 使用.on('pageshow'而不是.bind('pageinit'@Omar),尝试过,但结果仍然相同。您应该指定目标页面$('page2')。on('pageshow',function()或$(document)。on('pageshow','page2',function()。其中\page2是页面的id。 <a class="ui-btn-right" data-role="actionsheet">Menu</a
页面会滑动,但不会执行
Page2
中的脚本 使用.on('pageshow'
而不是.bind('pageinit'
@Omar),尝试过,但结果仍然相同。您应该指定目标页面$('page2')。on('pageshow',function()
或$(document)。on('pageshow','page2',function()
。其中\page2
是页面的id
。
<a class="ui-btn-right" data-role="actionsheet">Menu</a>
<div>
<a data-role="button" href="page2.html" data-transition="slide">Page2</a>
<a data-role="button" href="page3.html" data-transition="slide">Page3</a>
</div>
$(document).bind("pageinit", function () {
// code
});