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><script>var optionVal = $('option[value="myOption"]').value();</script></code>
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><script>var optionVal = $('option[value="myOption"]').value();</script></code>
No comments:
Post a Comment