I'm having trouble seeing the advantage of adding static functions to jQuery
as in:
jQuery.log = {
error : function() { ... },
warning : function() { ... },
debug : function() { ... },
};
as opposed to:
function log() { ... }
log.prototype.error = function() { ... }
log.prototype.warning = function() { ... }
log.prototype.debug = function() { ... }
It seems the former opens up the door to unintended closures. What are the
benefits of doing it this way as opposed to the traditional non-jQuery way?
--
View this message in context:
http://www.nabble.com/Advantages-of-adding-functions-to-jQuery-tf3404801.html#a9483351
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/