Part III. Advanced Topics
Prev   Next

Part III. Advanced Topics

Table of Contents

This Section is a Work in Progress
9. Performance Best Practices
Cache length during loops
Append new content outside of a loop
Keep things DRY
Beware anonymous functions
Optimize Selectors
Use Event Delegation
Detach Elements to Work With Them
Use Stylesheets for Changing CSS on Many Elements
Use $.data Instead of $.fn.data
Don't Act on Absent Elements
Variable Definition
Conditionals
Don't Treat jQuery as a Black Box
10. Code Organization
Overview
Encapsulation
Managing Dependencies
Exercises
11. Custom Events
Introducing Custom Events

Copyright Rebecca Murphey, released under the Creative Commons Attribution-Share Alike 3.0 United States license.


Prev   Next
Exercises Home This Section is a Work in Progress