I am trying to use jquery to first identify specific words in a span tag and then color the background of the div in which it is nested. HTML looks like this:
<div class="highlight item1 ll3">
<div class="Image">
<h2 class="Name">
<div class="type">
<span>Workshop</span>
</div>
<div class="Dates">
<p class="Desc">Toddlers are especially welcome to BALTIC on Tuesdays. Join
in the fun, as a BALTIC artist leads a practical session using a variety of
materials,...
</p>
So I think I need to use jQuery to determine if "Workshop" is equal, then color the div with the class highlight(for example, set the background to # 000). I need to repeat this so that each div.highlight having a different value gets a different color.
Thanks for that in advance.
Jason
source
share