Is there a way to bind the change event for a text field in jQuery? I.E. whenever the value changes, call some function? I am currently using keyup
but that doesn't hit every case, i.e. right click and paste.
Thanks.
Is there a way to bind the change event for a text field in jQuery? I.E. whenever the value changes, call some function? I am currently using keyup
but that doesn't hit every case, i.e. right click and paste.
Thanks.
$("#element").bind("keyup input paste", function() {
//Do Work Here
});
Have you tried using the change() trigger?
$('.target').change(function() {
alert('Handler for .change() called.');
});
keyup seems to work for me with copy and paste, at least in Firefox. Where do you see the problem? Which browser? Can you post an example?