我正在使用MJQuery滑塊。當我使用Mobile JQuery時,滑塊中的步增量不起作用。然而,它正常工作的版本 這是該頁面的版本,而不使用移動JQuery。在這種情況下,您無法將滑塊控件置於範圍內的任何位置。Mobile JQuery Slider的步驟增量不起作用
http://users.ecs.soton.ac.uk/smaj08r/vidtest/indexNotMJQ.html
代碼:
<html>
<script src="jquery-1.8.3.js"></script>
</head>
<body>
This is slider without MJQuery
<input type="range" name="slider-step" id="slider-step" value="2" min="1" max="4" step="1" />
</body>
</html>
在接下來的版本中,我使用的手機jQuery和這裏的滑塊控件步增量不工作。您可以將滑塊定位在兩個增量之間的任何中間點。
http://users.ecs.soton.ac.uk/smaj08r/vidtest/indexMJQ.html
代碼:
<html><head>
<script src="jquery-1.8.3.js"></script>
<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/mobile/1.2.0/jquery.mobile-1.2.0.min.js">
</script>
</head><body>
<div data-role="page">
<div data-role="content">
<input type="range" name="slider-step" id="slider-step" value="20" min="0" max="100" step="20" />
</div>
</div>
</body>
</html>
在移動JQuery的版本滑塊可被定位在這是錯誤的範圍內的任何點。我不知道爲什麼? 請幫助。非常感謝,
你的問題是模糊的,我不知道你在回答的方式尋找什麼? – andleer
@andleer非常感謝。我剛剛根據建議更新了代碼,但仍然無法正常工作。當然,控件不會有任何錯誤的值,但滑塊的位置仍然可以在任何兩個期望的位置之間。我只希望滑塊在所需的5個點上,這是遞增的目的。你仍然可以看到任何問題。謝謝, – smaj08r
正如你所看到的 http://jquerymobile.com/test/docs/forms/slider/index.html 步增量滑塊,滑塊不能定位在每個位置。它只停留在特定的步驟。 – smaj08r