Well, it's a common pattern that is used when creating a jQuery
plugin.
A common problem doing that is the use of a '$' sign, because other
frameworks use it too as well. I didn't try to use some frameworks
simultaneously yet, so I didn't encountered that problem by myself.
One of the way is to use 'jQuery' instead of '$' ('$' is a shorthand
of 'jQuery'), and to write, for example:

jQuery('a').click(function() { });
instead of
$('a').click(function() { });

But there is another way - this pattern allows you to use '$' in your
jQuery code without the worry of malfunctioning.

You can read more about the creating jQuery plugin in the following
articles:
http://blog.themeforest.net/tutorials/ask-jw-decoding-self-invoking-anonymous-functions/
http://blog.jeremymartin.name/2008/02/building-your-first-jquery-plugin-that.html
http://docs.jquery.com/Tutorials

Good luck)


On Jul 25, 4:04 pm, Kris <ilaymy...@yahoo.com> wrote:
> What does this do?
> (function($) { do some stuff } )(jQuery);

Reply via email to