cycling jQuery_Succinctly | Page 55

Sample: sample44.html
0
1
2
3
The use of index() does not really hit home until we consider how it can be used with events. As an example, by clicking the
elements in the code below, we can pass the clicked
element (using the keyword this) to the index() method to determine the clicked
's index. Sample: sample45.html