X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=event%2Fevent.js;h=485dc4edf2e3206149a0f37b2655ace2f8fcf002;hb=07040f8d039c116b8e5d0c493ba09f3b89c9479b;hp=bd1bb278afc551f66319310f37ec69fc79cb31e6;hpb=37c237af35a2040eb50bc2de84f1af35c19df6f0;p=jquery.git diff --git a/event/event.js b/event/event.js index bd1bb27..485dc4e 100644 --- a/event/event.js +++ b/event/event.js @@ -38,7 +38,7 @@ $.fn.hover = function(f,g) { if ( p == this ) return false; // Execute the right function - return $.apply(this,e.type == 'mouseover' ? f : g,[e]); + return (e.type == "mouseover" ? f : g).apply(this,[e]); } // Bind the function to the two event listeners @@ -67,10 +67,9 @@ $.fn.ready = function(f) { /* * Bind a number of event-handling functions, dynamically */ - var e = ["blur","focus","contextmenu","load","resize","scroll","unload", - "click","dblclick","mousedown","mouseup","mouseenter","mouseleave", - "mousemove","mouseover","mouseout","change","reset","select","submit", - "keydown","keypress","keyup","abort","error","ready"]; + var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + + "mousedown,mouseup,mouseenter,mouseleave,mousemove,mouseover,mouseout," + + "change,reset,select,submit,keydown,keypress,keyup,abort,error,ready".split(","); // Go through all the event names, but make sure that // it is enclosed properly @@ -143,13 +142,13 @@ $.fn.ready = function(f) { } else if ( $.browser == "msie" ) { // Only works if you document.write() it - document.write('<\/script>'); + document.write("<\/script>"); // Use the defer script hack - var script = document.getElementById('__ie_init'); + var script = document.getElementById("__ie_init"); script.onreadystatechange = function() { - if ( this.readyState == 'complete' ) + if ( this.readyState == "complete" ) $.ready(); };