Performance Append Outside of Loops Cache Length During Loops Detach Elements to Work with Them Don’t Act on Absent Elements Optimize Selectors Use Stylesheets for Changing CSS on Many Elements Don’t Treat jQuery as a Black Box Writing Stateful Plugins with the jQuery UI Widget Factory Append Outside of Loops