JQuery became more and more polular over the years. Luckily this was somehow forseen by the inventors and they introduces a set of guidelines how plugins are to be developed in terms of encapsulation, behavior to the framework, et al. These guidelines are reflected in the 'golden rules of plugin development'.
This presentation is all about them.
8. „Be aware! $ might not be
what you think.“
$ should never be used in plugins
jQuery allows redefining of the $ for
compatibity
$.noConfict()
Always use jQuery
9. „Do not pollute the global
scope!“
(function($, jQuery, undefined){
...
// your plugin code goes here
...
})(jQuery, jQuery);
15. Further resources
Official plugin repository
http://plugins.jquery.com
Official plugin authoring rules
http://docs.jquery.com/Plugins/Authoring
jQuery documentation
http://docs.jquery.com
17. License
This set of slides and the source code
included
in the download package is licensed under
the
Creative Commons Attribution-
Noncommercial-Share Alike 2.0 Generic
License