var oldVal = jQuery("#reversedRange").attr('current_year', jQuery("#reversedRange").val()); jQuery("#reversedRange").on('change input', function() { console.log(jQuery(this).val()); var newVal = jQuery(this).val(); if(newVal > oldVal) { console.log("left"); owl.trigger('prev.owl.carousel', [300]); } else if(newVal < oldVal) { console.log("right"); owl.trigger('next.owl.carousel'); } oldVal = newVal; });
Jagdish Sarma Asked question May 17, 2021