Selecting an element by its position in the DOM
This recipe demonstrates how to use an element's position with respect to its parent when you access it in the DOM tree. We will use the ASP.NET ListBox
control for this purpose. The constructs used in this example are as follows:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector |
This selects all descendant elements of the control with the specified ID. |
|
jQuery selector |
This selects the first child element of the control with the specified ID. |
|
jQuery selector |
This selects the last child element of the control with the specified ID. |
|
jQuery selector |
This selects all child elements of the control with the specified ID that have an index less than |
|
jQuery selector |
This selects all child elements of the control with the specified ID that have an... |