In general, I'd say go with jQuery.fn.foo, that's when you get the $(element).lots().of().nice().functionality();
jQuery.foo creates "global" functions, like $.getJSON() and the like, not usually what you want. Andreas On Dec 19, 2006, at 18:11, Mike Alsup wrote: >> Not sure when to use jQuery.foo versus jQuery.fn.foo > > jQuery.foo just creates a function on the jQuery object (technically, > on the constructor function). jQuery.fn.foo creates a function on the > prototype object of the jQuery object. If you want your function to > be available to all jQuery object instances, and to be chainable, use > jQuery.fn.foo notation. > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/