$(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.