0

i have the following slider:

<input id="sliderInput" class="slider slider-horizontal form-control" type="text" value=""
   data-slider-min="5" data-slider-max="20" data-slider-step="1"
   data-slider-value="10" data-slider-orientation="horizontal">

And combined the following javascript:

$('#sliderInput').slider()
$('#tester').click(function()
{
    alert($('#sliderInput').data.getValue());
})

However no matter what i do the value returned is always 10.

I read the following question:

How to get value of bootstrap-slider

However this didn't do anything for me :S

It seems it might be broken but can anyone tell me if it is possible to get the correct value? (maybe a hack?)

Community
  • 1
  • 1
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364

1 Answers1

1

IIRC that method is broken.

Try:

$('#sliderInput').data('slider').getValue()

elzi
  • 5,442
  • 7
  • 37
  • 61