cycling jQuery_Succinctly | Page 85

Sample: sample83.html
Notes: By adding a plugin to the jQuery.fn object, we are essentially saying that our plugin would like to use the jQuery function to select a context (DOM elements). If your plugin does not require a specific context (in other words a set of DOM elements) in which it needs to operate, you might not need to attach this plugin to the $.fn. It might make more sense to add it as a utility function in the jQuery namespace. Inside a plugin, this is a reference to the current jQuery object When you attach a plugin to the jQuery.fn object, the keyword this used inside of the attached plugin function will refer to the current jQuery object. Sample: sample84.html