10 Coding Tips to Write Superior jQuery Plugins

Published 5 years 6 months ago on February 28, 2012 — 1 min read

10 Coding Tips to Write Superior jQuery Plugins | Websanova.

Great, cohesive list of tips for writing your jQuery plugins:

  1. Keep All Your Code in a Closure
  2. Provide and Extend Default Options
  3. Always Return the Element
  4. Keep Single Use Code Outside Main Loop
  5. Setup Class Prototyping – The Why
  6. Setup Class Prototyping – The How
  7. Using the “this” Object
  8. Keep Your Settings in Each Object
  9. Separate Your Prototype Function Logic
  10. 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.

Copyright © 2006—2017 Jonathan Christopher