JQuery Range Input Listener

html, javascript, jquery, range

Solution

$('input[type=range]').on('input', function () {
    $(this).trigger('change');
});

This fires the `change` event on every `input` event.

Problem

Hey having a little trouble jquery and the hmtl5 range. I'm try to get the values as they changed but the event listener is not capturing it. Currently my code is: HTML ``` html += '<li>Apply Credits: <input type="range" min="0" max="'+credits+'" name="discount_credits" id="discount_credits" /> <span>'+credits+'</span></li>' ``` And the JS is: ``` $('#discount_credits').mousewheel( function() { alert('it changed!'); alert('new value = ' + $(this).val()); }); ``` I've also tried ``` $('#discount_credits').change( function() { alert('it changed!'); alert('new value = ' + $(this).val()); }); ``` Neither seem to work. Am I doing something wrong?

Original source