Tuesday, 3 January 2012

jquery Example - select an element through matched attribute value

Selects elements that have the specified attribute with a value exactly equal to a certain value.
In an assignment I have a multilevel dynamic combo box. And I have to select an element in which there are not id or class selector .For this I used attribute match selector in jQuery.
<strong>Examples:</strong>
<code>&lt;script>var optionVal = $('option[value="myOption"]').value();&lt;/script></code>

No comments:

Post a Comment