The jQuery site lists the basic plugin syntax for jQuery as this:
(function( $ ){ $.fn.myPlugin = function() { // there\'s no need to do $(th
The jQuery at the end passes itself (jQuery) over to the function, so that you can use the $ symbol within your plugin. You ccould also do
(function(foo){ foo.fn.myPlugin = function() { this.fadeIn('normal', function(){ }); }; })( jQuery );