The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Trigger math logic when slide on range slider
Hi there
I try to trigger math logic when I slide a range slider. At the moment the calculation does work only if I release the range slider. But I like to have instand calculation... I've tried it with this code, but it doesn't work:
jQuery("[type=range]").change(function(){
jQuery('#field_minrate').change();
});
October 15, 2018 at 7:51 am
The change function for an input field fires when the action is complete. You should be using the input event if you want instant access.
jQuery("[type=range]").on("input",function(){
see this: https://stackoverflow.com/questions/18544890/onchange-event-on-input-type-range-is-not-triggering-in-firefox-while-dragging
October 15, 2018 at 1:11 pm
Great! Thank you very much! :-)
For everyone who is interested - now my code looks like this:
jQuery("[type=range]").on("input",function(){
jQuery(this).change();
});
Discussion closed.