我试图理解jquerymobile,我想做的是当我从另一个链接加载另一个页面时运行javascript的东西,从菜单到子菜单1工作得很好,但是从子菜单1到1-1不是工作...
主站点菜单(index.php) - >子菜单1(menu1.php) - >子菜单1-1(menu11.php)
这是我的代码:
的index.php
<div data-role="page" id="main">
<div data-role="header" id="cosito" align="center" style="font-size:36px; font-family:'Naturelle'">avant</div>
<div class="titulo" align="center">Menu</div>
<div id="menu_">
<a href="cartelera.php" data-rel="page" data-transition="slide" class="btnChiqui">
<img src="img/rollo.png">
<span>Cartelera</span>
</a>
</div>
</div>
Menu1.php(index.php的子菜单)
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript" src="js/allscripts.js"></script>
<div data-role="page" id="sala_cines" data-add-back-btn="true" data-back-btn-text="Atras">
<div data-role="header" id="cosito" align="center" style="font-size:36px; font-family:'Naturelle'">Sala de Cines</div>
<div id="menu_">
<a href="cine.php" data-rel="page" data-transition="slide" class="btnChiqui">
<img src="img/rollo.png">
<span>Shopping del Sol</span>
</a>
</div>
</div>
Menu11.php(这里是menu1.php的子菜单,我的触摸屏不起作用)
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript" src="js/allscripts.js"></script>
<div data-role="page" id="cine_detalle" data-add-back-btn="true" data-back-btn-text="Atras">
<div data-role="header" align="center" style="font-size:36px; font-family:'Naturelle'">Cine 1</div>
//Stuff here
</div>
我的allscripts.js
$('#cine_detalle').live("pagecreate", pageInitializationHandler);
$('#estrenos').live("pagecreate", pageInitializationHandler);
$('#sala_cines').live("pagecreate", pageInitializationHandler);
function pageInitializationHandler(event) {
alert("Ok");
touchslider.createSlidePanel('#slidebar', 190, 5);
}
我做错了什么?任何帮助表示赞赏,谢谢,祝你有愉快的一天!