ElevateDev / meteor-autoform-nouislider

MIT License
9 stars 19 forks source link

Showing the current value of the slider #11

Closed Reached closed 8 years ago

Reached commented 8 years ago

Hi, Is it possible to show the current value of the slider in the view as shown on the noUiSlider examples?

Thank you

superandrew213 commented 8 years ago

http://refreshless.com/nouislider/slider-options/#section-tooltips

jimmiebtlr commented 8 years ago

Does the section tooltips solve it for you?

miri-am commented 8 years ago

Did not work for me. Example would be great.

superandrew213 commented 8 years ago

If you use this:

tooltips: [ false, wNumb({ decimals: 1 }) ]

then you need to add wNumb if you haven't already. Otherwise just set it to this:

tooltips: true

You can also do it without the tooltip and do it manually by using events and helpers.

Listen when the slider updates in events then store this value in a session variable or a reactive var. Then return it using a helper and call it inside your template just under the noUISlider field.