Search code examples
javascriptjquerybootstrap-slider

How to show the value inside the handler using bootstrap slider?


I am using boostrap slider and this is how i am implementing it:

$("#yearSlider").slider({step: 20000, min: 0, max: 200000})

How do I get the value inside the handler rather than having it in the tool tip?

Expected result

enter image description here


Solution

  • just use value property:

    Example: try to run this code in console on the page you linked (http://seiyria.com/bootstrap-slider/):

    document.getElementById('ex1').value
    

    you'll see the value is returned correctly