JQuery Range Input Listener

后端 未结 5 923
-上瘾入骨i
-上瘾入骨i 2021-02-05 03:45

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

5条回答
  •  自闭症患者
    2021-02-05 04:12

    The on change event seems to be working correctly for me: http://jsfiddle.net/zV3xD/7/

    
    
    0
    
    $('#discount_credits').change( function() {
        var newValue = this.value;        
        $('#newValue').html(newValue);
    });​
    

    Or you can try something like this:

    = 0

    Using the output example here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output

提交回复
热议问题