Here are 15 tips and tricks by the Web Revisions.
- Always Use the Latest jQuery Version
- Always load CDN-hosted copy of jQuery
- Always use ID as Selector Instead of Classes or Name
- Always Cache jQuery Objects before use
- Always use Tags Before Classes
- Use Chaining
- Just give your Selectors a Context
- Storing Data
- Preloading images
- Try to make code simpler using group queries
- jQuery Lazy Loading
- Always Return False
- Use join() for Longer Strings
- Try to avoid DOM Manipulation
- Check if an Element Exists
No comments:
Post a Comment
Do provide your constructive comment. I appreciate that.