Accessing parent and child controls
This recipe demonstrates how to access parent and child elements in the DOM when performing client-side validation of a sample form. The constructs used in this example are summarized as follows:
Construct |
Type |
Description |
---|---|---|
|
jQuery selector |
This selects an element based on its |
|
jQuery selector |
This selects all elements with the specified HTML tag |
|
jQuery object |
This refers to the current jQuery object |
|
jQuery method |
This adds the specified |
|
jQuery selector |
This selects checked input elements |
|
jQuery method |
This returns the immediate descendant element of the matched elements |
|
jQuery method |
This iterates over the matched elements and executes a function for each element |
|
jQuery method |
This prevents the default action of the event from being triggered |
|