Now that we have examined common ways to extend jQuery and jQuery UI by creating plugins, we can review and supplement what we've learned with a list of recommendations.
$alias from potential interference from other libraries by using
jQueryinstead or passing
$into an immediately invoked function expression (IIFE) so that it can be used as a local variable.
$.myPluginor the jQuery prototype with
$.fn.myPlugin, add no more than one property to the
$namespace. Additional public methods and properties should be added to the plugin's namespace (for example,