1
我在收聽jQueryMobile滑塊的更改事件時遇到困難。
在這個頁面中,該事件正確地觸發事件「slidestop」:
http://jsfiddle.net/2HEcY/
的相同代碼在我的網頁沒有任何觸發:
http://www.marianotomatis.it/test.php
你能看到的任何問題,在此代碼?jQueryMobile滑塊更改事件
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>My Title</h1>
</div><!-- /header -->
<div data-role="content">
<label for="slider-step">Input slider:</label>
<input type="range" name="slider-step" id="slider-step" value="150" min="0" max="500" />
</div><!-- /content -->
</div><!-- /page -->
<script>$("#slider-step").on("slidestop", function(e){ alert("STOP!"); });</script>
</body>
</html>
它完全解決了我的問題,非常感謝。 –