I am trying to write some jquery that will call a function when the object is blurry. Due to some requirements in my base code, I need to call a function, for example:
$("object").blur(myFunction());
instead of this:
$("object").blur(function() {
});
Unfortunately, binding the blur event using the first method does not work. It actually runs the method on page load, and then never binds this function. What am I doing wrong here?
I installed jsfiddle which demonstrates my problem if this helps you to visualize. http://jsfiddle.net/WskKJ/
source
share