In jQ code one can see string constant splitted into array instead of
array constant. For example :
// Attach a bunch of functions for handling common AJAX events
jQuery.each
("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split
(","), function(i, o) {
jQuery.fn[o] = function(f) {
return this.bind(o, f);
};
});
This can be seen in several places. I was wondering if using array in
this cases would yield faster jQ ?
jQuery.each(["ajaxStart","ajaxStop,ajaxComplete",
"ajaxError","ajaxSuccess","ajaxSend"],
function(i, o) {
jQuery.fn[o] = function(f) {
return this.bind(o, f);
};
});
Regards,
-- DBJ
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---