Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery mobile pageinit赢得';过渡后不会发生_Jquery_Html_Jquery Mobile - Fatal编程技术网

jQuery mobile pageinit赢得';过渡后不会发生

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

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