 <p><strong>Regarding #9:</strong></p> <p>When you provide a context to your selector queries you limit the size of the tree being traversed to find the elements matching your selector, especially if you're using selectors that use tag names like: $('div > span').</p> <p>Performance depends on the type of selector and the number of elements in the context you're providing.</p> <p>Take a look at <a href="https://developer.mozilla.org/En/DOM/Document.getElementsByTagName" rel="nofollow noreferrer">getElementsByTagName</a> to better understand these issues.</p> <p>As for "which one is better" - this depends heavily on the size of the DOM being traversed and on a number of other elements, but in general, the first selector (the one with the context) should be faster.</p> <p><strong>Regarding #12:</strong></p> <p>In general, it is good practice to use event delegation when the number of child elements inside a parent element (cells inside a table, for example) is unknown and is expected to be quite large. This usually applies to cases where data is pulled from a server. The common scenarios are tree and grid structures.</p> <p><strong>Regarding #13:</strong></p> <p>I think the example provided in the document you're referring to does the job, but I'll try to elaborate a bit further. Classes are a common and standard way to attach additional information to HTML nodes. Lets take a Tab bar as an example: assuming you have a standard class "tab" which applies to every tab in your tab bar, you could add an additional class to one of the tabs to indicate that it is currently selected. Adding an additional class called "selected" would allow you to apply a different style to the selected tab and query the tab bar using jQuery for some additional logic (for example: check which tab is currently selected to perform an HTTP request and retrieve the content for this tab).</p> <p><strong>Regarding #14:</strong></p> <p>Classes are limited in the type and amount of data you can (or should) store in them. Data is a more flexible way to store large amounts of state data for HTML elements.</p>