Extensible jQuery Plugin Development
summary
Explains a concrete jQuery pattern: store defaults and methods in an internal plugin object, give it a name property for namespaced events, attach per-element instances via .data so you can call methods by name and override methods (toggle/animation) without editing core code. Uses jQuery .extend, .on/.unbind, .data and array notation to choose animation handlers like slideToggle. Adds teardown, context/live binding, and shows upgrades keep overrides intact if the public methods remain stable.
AI-written summary · about
chapters (21)
- 0:00Intro
- 2:40Anatomy of a Plugin
- 3:59Put the Plugin to Use
- 5:19Rebind Your Plugin
- 5:54Modify Plugin
- 6:36Changing Options After the Fact
- 7:35Proposed Improvements
- 8:43Store Methods in Plugin Object
- 9:07Add Ability to Call Method
- 9:26Initialize Plugin
- 10:23Create Initializer Method
- 11:03Initialize the Plugin
- 11:22Create Unique Plugin Instance
- 11:36Store Instance and Initialize
- 12:19Change Method Name
- 12:38Create a Tear-down Method
- 12:57Add Live Binding and Contexts
- 13:35Bind Event to Parent Element
- 13:56New Development Pattern
- 14:57Benefits to This Method
- 15:40Recommended Reading








