How can I bind an OnChange event of a TextBox to function using jQuery?
Am trying this and its failing:
$(document).ready(function() {
$(\"input#
You must change the event name from "change" to "onchange":
$(document).ready(function(){
$("input#tags").bind("onchange", autoFill);
});
or use the shortcut binder method change:
$(document).ready(function(){
$("input#tags").change(autoFill);
});
Note that the onchange event usually fires when the user leave the input, so for auto-complete you better use the keydown event.