I've been searching for a solution to this issue but haven't found anything that works for me.
Check out this code on jsfiddle.
Person1 and Person2 both have
class="from"
and the CSS selector is .from so it applies to both. However, I want it to only apply to Person1 using JavaScript/jQuery.
I've attempted various methods like
$( "span.from:contains('Person1')" )
but nothing seems to work. Can someone suggest a solution?
Your help would be greatly appreciated :)