Web Development with jQuery®

(Elliott) #1

(^46) ❘ CHAPTER 2 SELECTING AND FILTERING
jQuery provides no less than fi ve methods for discovering and working with an element’s siblings.
Whether you need to move to the next sibling element, previous sibling element, fi nd all preceding or
all succeeding sibling elements, or all siblings all together, there’s a method that matches the situation.
All jQuery’s traversal methods share the characteristic of providing a selector to a traversal method
to limit traversal to elements that match the provided selector.
Each of the methods introduced here are presented in the following example. If you have down-
loaded the book’s supplemental materials, you’ll fi nd this example in the Chapter 2 folder named
Example 2-3.
<!DOCTYPE HTML>




content="application/xhtml+xml; charset=utf-8" />

November 2013






























[http://www.it-ebooks.info](http://www.it-ebooks.info)

November

2013
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
27 28 29 30 31 td>
1 2