2016-05-03 56 views
0

我有這個簡單的滑塊jQuery Mobile的爲什麼data-mini和data-highlight不能在slider(jquery)中工作?

<label for="slider-1">Input slider:</label> 
<input type="range" name="slider-1" id="slider-1" value="60" min="0" max="100" data-highlight="true" data-theme="b" data-track-theme="b" data-mini="true"/> 

的代碼幾乎複製和文件(https://demos.jquerymobile.com/1.2.0/docs/forms/slider/)和滑塊作品粘貼。價值,數據主題,數據軌道主題都很好,並且很有用。相反,數據迷你和數據高亮對滑塊沒有影響......也嘗試過不同的瀏覽器。爲什麼會發生?編輯: 試過腳本的方式。沒有財富。

<script> 
$(document).ready(function(){ 
    $('#slider-1').slider({ mini: true }); 
}); 
</script> 
+0

似乎是工作的罰款:https://jsfiddle.net/j0434dod/ – Justinas

+0

我知道,跟着儘可能的文件。我會很高興發佈一些其他代碼來顯示這個問題,但我不知道哪個部分可能會導致這個(部分!)問題。 –

回答

0

已解決。庫版本錯誤

更改

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.css" /> 
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.0rc1/jquery.mobile-1.0rc1.min.js"></script> 

<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> 

解決了這個問題