简体   繁体   中英

Sending value from ui.value (jquery UI) of a slider to input

How can I send values of uk-clearfix value js_total_value and uk-clearfix value js_total_days to input with id=bani_slide and id=timp_slide ?

Here is my shortcode from contact form 7:

[hidden bani id:bani_slide default:"4000"]
[hidden timp id:timp_slide default:"30"]

Here is link to site: http://files.mzlucas.ru/dacredit/index.html

And here my HTML code:

<div class="uk-clearfix labels_wrapper">
  <div class="uk-clearfix label">РАЗМЕР ЗАЙМА</div>
  <div class="uk-clearfix value js_total_value">4000</div>
  <div class="uk-clearfix drag">
    <div id="range3" class="js_range"></div>
  </div>

</div>
<div class="uk-clearfix labels_wrapper second">
  <div class="uk-clearfix label">СРОК ЗАЙМА</div>
  <div class="uk-clearfix value js_total_days">30
  </div>
  <div class="uk-clearfix drag">
    <div id="range4" class="js_range"></div>
  </div>

</div>

You need to alter your noUiSlider to append the value to the hidden div when the value updates

slider.noUiSlider.on('update', function(values, handle){
    $('#bani_slide').val(values[handle]);
});

for more info visit the documentation

note you have this implemented on some inputs that are on the bottom of your page you should study the scripts.js file for the implementation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM