0
我正在使用bootstrap-slider.js我希望如果有人能幫我添加一個函數來添加一個類(.active),如果滑塊有的特定值(ex.1100)與jQueryjQuery:添加基於滑塊值的類/ bootstra-slider.js
類active
應該被添加到圖像或一個div (我使用字體真棒圖標作爲在演示一個例子)
我的當前js
$("#slider").slider({
tooltip: 'always'
});
$("#slider").on("slide", function(slideEvt) {
$("#slider-val").val(slideEvt.value); /* Changes the value of the input field with the slider value */
});
Codepen:http://codepen.io/anon/pen/ojdEBM