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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -