Hi there,

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


I have some Questions about the selector and the parameters.
Say for example, I wanted to pass parameters into the plugin:
(function($) {
	// jQuery plugin definition
	$.fn.MyPlugin = function(params) {
         // do something
		return this;
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: