This document summarizes strategies for transforming unmaintainable front-end code ("Disaster CodeTM") into organized, high-quality code through proper planning, separation of concerns, performance optimization, and stakeholder communication. It outlines how the author's team improved their codebase ("Neptune") by adopting modular patterns like MVC, optimizing page load times, and collaborating on standards. The document stresses that upfront planning, separation of functionality, and ongoing maintenance are crucial to developing software that is sustainable, performant, and a pleasure to work with.
81. cache jQuery selections in your code
var galleryItems = $(‘.gallery-item’)
http://training.bocoup.com/screencasts/the-importance-ofcaching-jquery-selections/