javascript - jQuery .change not triggering -
i receive no console messages while modifying text in input.
<script> $( document ).ready( function () { $( "#oldpassword" ).change( function() { console.log( "old password changed!" ); }); }); </script> <form> <label for="oldpassword">old password</label> <input id="oldpassword" /> <div id="oldpasswordcheck"></div>
... , of course rest of form code. cutting code down such barebones reveals problem, not time. ideas?
your code working here, need keyup
change
triggered when focus gone out of input
, need event key pressed.
$(document).ready( function () { $( "#oldpassword" ).keyup( function() { console.log( "old password changed!" ); }); });
Comments
Post a Comment