Accessing sibling controls
In the previous recipe, we traversed upwards and downwards from an element in the DOM tree. In this recipe, let's traverse to other controls on the same level. The constructs used in this example are summarized as follows:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector |
This matches all elements with the specified |
|
jQuery selector |
This selects all elements with the specified HTML tag |
|
jQuery object |
This refers to the current jQuery object |
|
jQuery event binder |
This binds a handler to the click event of an element |
|
jQuery method |
This prevents the default action of the event from being triggered |
|
jQuery event binder |
This triggers the focus event of an element or binds an event handler to the focus event |
|
jQuery method |
This returns the value of the specified property for the first... |