10 Coding Tips to Write Superior jQuery Plugins | Websanova.
Great, cohesive list of tips for writing your jQuery plugins:
- Keep All Your Code in a Closure
- Provide and Extend Default Options
- Always Return the Element
- Keep Single Use Code Outside Main Loop
- Setup Class Prototyping – The Why
- Setup Class Prototyping – The How
- Using the “this” Object
- Keep Your Settings in Each Object
- Separate Your Prototype Function Logic
- Provide a Setter/Getter Option
Beyond the list being really great, I love the language used to explain why these suggestions should be taken under consideration. Finding good, technical information with easy to follow language is a great discovery.