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
html += '<li>Apply Credits: <input type="range" min="0" max="'+credits+'" name="discount_credits" id="discount_credits" /> <span>'+credits+'</span></li>'
A JS to:
$('#discount_credits').mousewheel( function() {
alert('it changed!');
alert('new value = ' + $(this).val());
});
Próbowałem też
$('#discount_credits').change( function() {
alert('it changed!');
alert('new value = ' + $(this).val());
});
Żadne z nich nie działa. czy robię coś źle?