Hi there,

I have been checking out the following sitepoint tutorial on creating a plugin using Jquery

http://www.sitepoint.com/how-to-deve...jquery-plugin/

I have some Questions about the selector and the parameters.
Say for example, I wanted to pass parameters into the plugin:
Code:
(function($) {
	// jQuery plugin definition
	$.fn.MyPlugin = function(params) {
             
         // do something
		return this;
	};
})(jQuery);
It is as simple as $(selector).MyPlugin(someparameters)

And conversely if the plugin takes no parameters $(selector).MyPlugin();

Firstly is my understanding correct and secondly what if the plugin doesn't
require a selector? What if it doesn't need to do anything to a given DOM element?

would it be something like:

$().MyPlugin(someparameters)