JQuery Range Input Listener
Hej, masz małe problemy z jquery i zasięgiem hmtl5. Próbuję uzyskać wartości w miarę ich zmiany, ale detektor zdarzeń go nie przechwytuje. Obecnie mój kod to:
HTML
<code>html += '<li>Apply Credits: <input type="range" min="0" max="'+credits+'" name="discount_credits" id="discount_credits" /> <span>'+credits+'</span></li>' </code>
A JS to:
<code>$('#discount_credits').mousewheel( function() { alert('it changed!'); alert('new value = ' + $(this).val()); }); </code>
Próbowałem też
<code>$('#discount_credits').change( function() { alert('it changed!'); alert('new value = ' + $(this).val()); }); </code>
Żadne z nich nie działa. czy robię coś źle?