June 2013
Beginner
444 pages
9h 45m
English
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 jQuery instead or passing $ into an immediately invoked function expression (IIFE), so that it can be used as a local variable.$.myPlugin or 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, $.myPlugin.publicMethod or $.fn.myPlugin.pluginProperty).