bootstrap-slider

Destroy and re-initialize a bootstrap-slider

送分小仙女□ 提交于 2020-08-09 06:57:49
问题 I am using the Bootstrap-slider found here - https://github.com/seiyria/bootstrap-slider and currently am using v10 (although I've tried with v11 as well but the same result). This is my code: /* For better styling - this uses Bootstrap slider */ $('.bs_sliders').each(function () { var id = '#' + $(this).attr('id'); if (typeof window[id] !== 'undefined') { window[id].slider('destroy'); delete window[id]; } // .on will only work with an ID based selector not class window[id] = $(id).slider({

Destroy and re-initialize a bootstrap-slider

自作多情 提交于 2020-08-09 06:55:40
问题 I am using the Bootstrap-slider found here - https://github.com/seiyria/bootstrap-slider and currently am using v10 (although I've tried with v11 as well but the same result). This is my code: /* For better styling - this uses Bootstrap slider */ $('.bs_sliders').each(function () { var id = '#' + $(this).attr('id'); if (typeof window[id] !== 'undefined') { window[id].slider('destroy'); delete window[id]; } // .on will only work with an ID based selector not class window[id] = $(id).slider({

How to set tooltips in Bootstrap-Slider to be text strings vs. tick values

浪子不回头ぞ 提交于 2020-01-15 02:35:27
问题 I am wondering if it is possible to override the tick values in Bootstrap-Slider (latest v9.7.2 at time of post) to be a text string vs. the tick value. In the screen shot below, the tick value "2" appears above the last select element on the slider. I want to be able to have the word "Speak" appear in stead. Is that possible? Here is my HTML: <div class="form-group"> <label class="col-md-4 control-label" for="language_french">French</label> <div class="col-md-4"> <input id="language_french"

How to get the value of the slider bootstrap?

你说的曾经没有我的故事 提交于 2019-12-28 04:01:05
问题 How to get the values of the slider bootstrap to hidden iputs? <input type="hidden" name="min_value" id="min_value" value=""> <input type="hidden" name="max_value" id="max_value" value=""> $(function() { $( "#slider-range-s1" ).slider({ range: true, min: 0, max: 500, value: [ 0, 500 ] }); }); 回答1: I think it's currently broken. Documentation states: Methods .slider('getValue') Get the value. How ever, calling $('#sliderDivId').slider('getValue') returns the jQuery selector rather than the

seiyria/bootstrap-slider getValue() not working

末鹿安然 提交于 2019-12-25 07:20:35
问题 I've looked through all the answers on this topic, but for some reason I can't get it to work. I've set up a slider with the following markup: <input data-slider-id="Xslide" type="text" data-provide="slider" data-slider-min="0" data-slider-max="10" data-slider-step=".5" data-slider-value="0" data-slider-tooltip="show" data-slider-orientation="vertical" data-slider-reversed="true"></input> What I want first of all is to console.log its numerical value. I've tried playing with the type to

Using bootstrap-slider with jQuery UI

 ̄綄美尐妖づ 提交于 2019-12-05 13:12:25
问题 I want to use bootrap-slider with jQuery UI. I am following the documentation and loaded the plugin code after loading the Bootstrap CSS and jQuery. However, the slider is not getting initialized - the <input> remains as it is, and I don't see any error in browser console. Following is the code: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" media="all

Using bootstrap-slider with jQuery UI

亡梦爱人 提交于 2019-12-04 00:19:21
I want to use bootrap-slider with jQuery UI. I am following the documentation and loaded the plugin code after loading the Bootstrap CSS and jQuery. However, the slider is not getting initialized - the <input> remains as it is, and I don't see any error in browser console. Following is the code: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" media="all" /> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.js" type="text/javascript"><

How to get the value of the slider bootstrap?

試著忘記壹切 提交于 2019-11-27 13:59:26
How to get the values of the slider bootstrap to hidden iputs? <input type="hidden" name="min_value" id="min_value" value=""> <input type="hidden" name="max_value" id="max_value" value=""> $(function() { $( "#slider-range-s1" ).slider({ range: true, min: 0, max: 500, value: [ 0, 500 ] }); }); I think it's currently broken. Documentation states: Methods .slider('getValue') Get the value. How ever, calling $('#sliderDivId').slider('getValue') returns the jQuery selector rather than the value... For now you could manually grab it from the data object... $('#sliderDivId').data('slider').getValue()