Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Slider Controls?

I'm currently using http://www.eyecon.ro/bootstrap-slider/ which works a treat, however i'd like to output the value in realtime to an input box.

The js does this to a tooltip which is fine, however once you leave the slider, you can't see what you set it to. Any suggestions?

like image 203
K20GH Avatar asked May 18 '13 07:05

K20GH


Video Answer


1 Answers

You can log the slider value at real time using the slide event that is supplied with the plugin.

See this demo: http://jsfiddle.net/vMLPF/1/

Code:

$('#foo').slider().on('slide', function(_ev) {
    $('#bar').val(_ev.value);
});

In the above code, #bar represents the input box in which you want to show the slider value in real time.

like image 98
techfoobar Avatar answered Sep 29 '22 22:09

techfoobar