cycling jQuery_Succinctly | Page 33

.attr('href', 'http://docs.jquery.com') .end() .find('a') .click(function () { return confirm('Leave this page?'); }) .end() .appendTo('body'); })(jQuery); The concept you need to take away from the previous example is that jQuery can be used to craft and operate complex DOM structures. Using jQuery methods alone, you can whip up most any DOM structure you might need. 33