我正在为一个项目创建自己的图片库。为此,我需要滑动事件。所以在 jsfiddle 上找到了下面的代码。插入所有必要的文件。它显示了列表和所有..但是滑动仍然不起作用.? 我在正确的地方编写 jquery 代码吗?还是有什么不对?这是我的代码:
<html>
<head>
<meta charset="utf-8" />
<title>Home</title>
<!-- Meta viewport tag is to adjust to all Mobile screen Resolutions-->
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="Css/style.css" />
<link rel="stylesheet" type="text/css" href="Css/Jstyle.css" />
<link rel="stylesheet" type="text/css" href="Css/jquery.mobile.theme-1.2.0.css" />
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
<script type="text/javascript" src="Javascript/jquery1.js"></script>
<script type="text/javascript" src="Javascript/jquery2.js"></script>
<script type="text/javascript" src="css/jq1.6.2.js"></script>
<script type="text/javascript">
$("#listitem").swiperight(function() {
$.mobile.changePage("#page1");
});
</script>
</head>
<body>
<div data-role="page" id="home">
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li id="listitem"> Swipe Right to view Page 1</a></li>
</ul>
</div>
</div>
<div data-role="page" id="page1">
<div data-role="content">
<ul data-role="listview" data-inset="true" data-theme="c">
<li id="listitem">Navigation</li>
</ul>
<p>
Page 1
</p>
</div>
</div>
</body>