cycling jQuery_Succinctly | Page 25
Sample: sample11.html
jQuery.com
jQuery.com
jQuery.com
If you were to load the HTML in a browser, the browser would alert for the id value of each
element in the page. Since there are three
elements in the page, you get three iterations via the each() method and three alert windows. Extracting elements from a wrapper set, using them directly without jQuery Just because you wrap jQuery functionality around an HTML element does not mean you lose access to the actual DOM element itself. You can always extract an element from the wrapper set and operate on the element via native JavaScript. For example, in the code below I am setting the title attribute of the
element in the HTML page by manipulating the native title property of the
DOM element. Sample: sample12.html
jQuery.com
25
cycling jQuery_Succinctly | Page 24
cycling jQuery_Succinctly | Page 26