Namespaces in jQuery

jQuery encourages using namespaces for methods in the $ namespace, like $ rather than $.bar(). This works for $ because methods don't expect this to refer to anything specific, and the way javascript works is to assign this to the last-named object, so in $, this refers to $.foo. This idea fails for plugins, however, […]