maybe array ...

maybe array ...


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