jquery mobile - loadPage 问题 [英] jquery mobile - loadPage issue
本文介绍了jquery mobile - loadPage 问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法让 jQuery-mobile 加载页面将我的下一个页面加载到content
"div
.
我已将我的页面精简到基本信息,这是代码.
index.html:
<头><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>JQuery 移动加载页面测试</title><link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"><script src="http://code.jquery.com/jquery-1.9.1.min.js"></script><script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>头部><身体><div data-role="页面"><div id="containerTest" data-role="content"><input type="button" id="nextPage" data-inline="true" value="加载第二页"/>
<!--/内容-->
<!--/page --><脚本>$( "#nextPage" ).on( "click", function(){$.mobile.loadPage("nextPage.html",{pageContainer: $('#containerTest')});});