<div id="expander-demo" class="ui-widget-content">
<p>Snap! the overstrained line sagged down in one long festoon; the tugging log was gone.</p>
<a href="index2.html" class="ui-btn ui-btn-inline ui-btn-b moreinfo">More Info..</a>
</div>
此<a href="index2.html">
未正确加载页面。按下更多信息链接后,页面index2.html
的操作不会发生。如果我再次刷新页面,则操作正确进行。
为什么会这样?
index2.html:
<!DOCTYPE html>
<html>
<head>
<title>Third Page</title>
<meta charset="iso-8859-15">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQuery and jQuery mobile -->
<script src="js/jquery_2.1.0.min.js"></script>
<script src="js/jquery_mobile_1.4.2.js"></script>
<link rel="stylesheet" href="css/jquery.css" type="text/css"/>
<script src="js/jquery.mobile.swiper.js" type="text/javascript"></script>
</head>
<body>
<div data-role="page" data-swipeleft="Pages/page1.html">
<div data-role="header">
<h1>jQuery Simple Swiper Plugin Example</h1>
</div>
<!-- /header -->
<div data-role="content"><br>
<br>
<br>
<br>
<br>
<br>
<div align="center"> Swipe the page to see it in action.</div> </div>
<!-- /content -->
</div>
<!-- /page -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36251023-1']);
_gaq.push(['_setDomainName', 'jqueryscript.net']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
答案 0 :(得分:0)
不确定这是否有助于您解决问题,但也许可以尝试将jQuery包装在其中。
$( document ).ready(function() {
//your code here
});
答案 1 :(得分:0)
您的网址更改为javascript或浏览缓存,您可以尝试测试完整网址包括 host / index2.html ,删除浏览器缓存或查看浏览器生成的html源代码或添加按钮和javascript警报锚点网址