Tôi đang làm việc để tạo thư viện hình ảnh của riêng mình cho một dự án. Đối với điều đó tôi cần sự kiện swipe. Vì vậy, tìm thấy mã dưới đây trên jsfiddle. Đã chèn tất cả các tệp cần thiết. Nó cho thấy danh sách và tất cả .. Nhưng vẫn swipe không hoạt động.? Tôi có viết mã jquery ở đúng chỗ không? Hoặc có điều gì đó sai? Here`s mã của tôi:Trượt trên thiết bị di động jQuery không hoạt động
<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>
Điều gì là bí ẩn? Bạn có thực sự thêm tệp vào máy chủ của mình không? Bất kỳ lỗi nào trong bảng điều khiển nếu bạn nhìn vào một máy tính bình thường – mplungjan
Mã này thậm chí không hoạt động đối với tôi, ngay cả khi tôi áp dụng giải pháp được chấp nhận – Black