Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
29
rated 0 times [  35] [ 6]  / answers: 1 / hits: 38571  / 11 Years ago, sat, may 18, 2013, 12:00:00

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?


More From » jquery

 Answers
72

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.


[#78152] Thursday, May 16, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cristinadomoniquel

Total Points: 320
Total Questions: 94
Total Answers: 94

Location: Moldova
Member since Sat, Aug 6, 2022
2 Years ago
;