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

Slack Signup
Newsletter Optin
Help Desk

Trigger math logic when slide on range slider

Labels

This Discussion is public

Notifications

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();
});

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

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.