Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the value of the slider bootstrap?

Tags:

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]   }); }); 
like image 969
NETTO Avatar asked Apr 01 '13 02:04

NETTO


People also ask

Does bootstrap have a slider?

Bootstrap slider is an interactive component that lets the user swiftly slide through possible values spread over a desired range. Note: You can also see multi-range sliders, but remember, that they do not work with this plugin.

How do I display Bootstrap carousel with three posts in each slide?

Following are the steps to create a Bootstrap carousel:Apply CSS to resize the . carousel Bootstrap card body by using the code segment below. In this step, the sliding images are defined in the division tag as under. Last step is to add controls to slide images using the carousel-control class as below.


1 Answers

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

like image 73
ilovett Avatar answered Oct 15 '22 13:10

ilovett