Problem:
The blur
and keyup
events each fire once onload, and only onload. How can I get them to work correctly?
jQuery:
function myFunction(text){
alert(text);
}
$('#input1').on({
keyup: myFunction('keyup'),
blur: myFunction('blur'),
focus: function(){console.log('focus!');}
});
Fiddle: https://jsfiddle.net/GrMQX/