Thursday, February 18, 2010

JQuery Tips and Optimization

JQuery Tips For Developers

  1. Load the framework from Google Code
  2. Use data method and avoid storing data inside the DOM. Some developers have a habit of storing data in the HTML attributes
  3. Use Cheat Sheets
  4. Compress Javascript files
  5. Use Firebug
  6. Use ID as Selector whenever possible
  7. Use Tags Before Classes
  8. Cache jQuery Objects
  9. Bind certain jQuery functions to $(window).load event
  10. Use Chaining to limit selectors, make the code more simple and elegant

The complete article can be found in Tripwire Magazine.

No comments: