Given:
<div>
<span><a href="#">abc</a></span>
<span><a href="#">def</a></span>
</div>
Is there a way to do a string comparison with toUpperCase() between a given string value and the link text (as shown above in the span collection) and if it doesn’t match hide the span? Anyway to incorporate “contains” in the mix?
Thanks,
rod.
You could do the following. But keep in mind this will run for all
atags within aspan. You should modify it will aidon yourdivor some kind ofclassattribute.See it in action: http://jsfiddle.net/KCCVm/