cycling jQuery_Succinctly | Page 15
Chapter 1 Core jQuery Base concept behind jQuery While some conceptual variations exist (e.g. functions like $.ajax) in the jQuery API, the central concept behind jQuery is "find something, do something." More specifically, select DOM element(s) from an HTML document and then do something with them using jQuery methods. This is the big picture concept. To drive this concept home, reflect upon the code below. Sample: sample1.html
Notice that in this HTML document we are using jQuery to select a DOM element (
). With something selected, we then do something with the selection by invoking the jQuery methods text(), attr(), and appendTo(). The text method called on the wrapped
element and set the display text of the element to be “jQuery.” The attr call sets the href attribute to the jQuery Web site. Grokking the "find something, do something" foundational concept is critical to advancing as a jQuery developer. 15
cycling jQuery_Succinctly | Page 14
cycling jQuery_Succinctly | Page 16