I am trying to get a function to work so that I get an alert (for now!) when a user has entered a four character code into a text box.
I'm using...
$(window).load(function () {
$("#textbox").on('input', function () {
if ($("#textbox").val().length > 3) {
alert("Four characters detected!");
}
});
});
I must be missing something, as the alert doesn't fire. JSFiddle at: http://jsfiddle.net/1s8phz4w/
TIA JV