X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=event%2Fevent.js;h=492ddada1ecae60d52938993ed9991ad0f9e45ee;hb=cef11df838cef0a09990700818154ff08f04812c;hp=4171562ecaaf6aab90eca73e1465e246d789441a;hpb=6ae392a4e57834224b2a686d774ab210da25daa5;p=jquery.git diff --git a/event/event.js b/event/event.js index 4171562..492ddad 100644 --- a/event/event.js +++ b/event/event.js @@ -16,7 +16,7 @@ jQuery.prototype.toggle = function(a,b) { e.preventDefault(); // and execute the function - return jQuery.apply( this, this.last, [e] ) || false; + return this.last.apply( this, [e] ) || false; }) : // Otherwise, execute the old toggle function @@ -38,7 +38,7 @@ jQuery.prototype.hover = function(f,g) { if ( p == this ) return false; // Execute the right function - return (e.type == "mouseover" ? f : g).apply(this,[e]); + return (e.type == "mouseover" ? f : g).apply(this, [e]); } // Bind the function to the two event listeners @@ -52,7 +52,7 @@ jQuery.prototype.ready = function(f) { // If the DOM is already ready if ( jQuery.isReady ) // Execute the function immediately - jQuery.apply( document, f ); + f.apply( document ); // Otherwise, remember the function for later else { @@ -67,9 +67,9 @@ jQuery.prototype.ready = function(f) { /* * Bind a number of event-handling functions, dynamically */ - var e = "blur,focus,contextmenu,load,resize,scroll,unload,click,dblclick," + + 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(","); + "change,reset,select,submit,keydown,keypress,keyup").split(","); // Go through all the event names, but make sure that // it is enclosed properly @@ -100,7 +100,7 @@ jQuery.prototype.ready = function(f) { this[o+f]++; // And execute the bound function - return jQuery.apply(this,f,[e]); + return f.apply(this, [e]); }); }; @@ -124,7 +124,7 @@ jQuery.prototype.ready = function(f) { if ( jQuery.readyList ) { // Execute all of them for ( var i = 0; i < jQuery.readyList.length; i++ ) - jQuery.apply( document, jQuery.readyList[i] ); + jQuery.readyList[i].apply( document ); // Reset the list of functions jQuery.readyList = null;