I would like to use a jquery to select the following span:
<span id="RequiredFieldValidator1" class="validationerror" style="color: Red; display: none;">*</span>
But not select the following span which differs from the original in that the style attribute has a display property whose value is inline instead of none.
<span id="RequiredFieldValidator2" class="validationerror" style="color: Red; display: inline;">*</span>
I am aware inline styles are evil but an asp.net web forms validator control is generating it and doing a lot of good as well as evil.
Can this be done using jquery selectors? I'm new to jquery.
$("span[style*=inline]")
will select all span elements with the style attribute which has the value "inline" in it somewhere.
Try something like this:
$('.validationerror:hidden')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With