javascript - Show initial value of bootstrap slider in a span -
I use it and I have a problem. I want to show the value of the slider in the span next to the bar. At the moment, I change it only when the slider does not but when the window loads with its initial value for the first time.
Here's my code:
& lt; Div class = "form-group" & gt; & Lt; span style = "float: left;" & Gt; Age & lt; / Span & gt; & Lt; span style = "float: right;" & Gt; & Lt; span id = "ageval" & gt; & Lt; / Span & gt; & Lt; / Span & gt; & Lt; Data-slider-max = "55" data-slider-step = "1" data -slider - value = "{{age}}" value = "{{age}}" /> & Lt; / Div & gt; $ ('# Age'). Slider ({tooltip: 'hide'}) $ ('# age'). ('Slide', Function (Slieve) {$ ("#inum"). Text (slideEvt.value);});
use slider.value $ ("#will"). Html ($ ("# age") .slider (). Value); or $ ("# ageval"). Html ($ ("# age"). Slider ("getValue"));
Comments
Post a Comment