Ivan Vulović Ivan Vulović - 1 year ago 51
jQuery Question

Document.ready won't work

Any idea why this code doesn't work ? I defined a text input field with this ID in the HTML.


Answer Source

keyup takes a function:

$('#inputUsername').keyup(function() {

Or, define the function before hand:

function clickHandler(event) {

And pass it in:


And unquote document -- it's its own variable.