From c330527318775d32c87954f640c53066e7a732d9 Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 6 Jan 2007 05:31:47 +0000 Subject: Converted instances of new function(){ ... } to use jQuery.each(...) instead. Also, removed unnecessary documentation for trigger functions (.mouseup()!?). --- src/ajax/ajax.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/ajax') diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 45159a5f5..953876a19 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -240,17 +240,11 @@ if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) * @param Function callback The function to execute. * @cat AJAX */ - -new function(){ - var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","); - - for ( var i = 0; i < e.length; i++ ) new function(){ - var o = e[i]; - jQuery.fn[o] = function(f){ - return this.bind(o, f); - }; +jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ + jQuery.fn[o] = function(f){ + return this.bind(o, f); }; -}; +}); jQuery.extend({ -- cgit v1.2.3