i have the following code which extends the JQuery and adds a method to the JQuery:
$.fn.attachWithMessage = function () { $(this).focusin(showMessage());
just remove the parenthesis
$(this).focusin(showMessage());
should be
$(this).focusin(showMessage);
Hope this helps