I have 2 "lists"
one is a tag list:
<span class="blog-tags minor-meta">
<span>
<a rel="tag">3d printing</a>
<a rel="tag">art</a>
<a rel="tag">medical</a>
<a rel="tag">Prototyping</a>
</span>
</span>
and another services list
<ul class="sp_sectors">
<li>Engineering</li>
<li>Automotive</li>
<li>Medical</li>
<li>Prototyping</li>
<li>ART</li>
</ul>
I'm trying to SEARCH every tag in the tag list if it exists in the services list and add a "class = active" to it: for example, first tag "3d printing".. search through the "sp_sectors" list (not found = nothing happens, move to the second tag and search again, second tag is "art", now we search in the second list and we find art "
Here's the code I wrote to search through the list:
jQuery('.blog-tags > span > a').each(function() {
var thi_tag = jQuery(this).html();
jQuery('.sp_sectors li').each(function() {
jQuery(".sp_sectors li:contains('" + thi_tag + "')").addClass('active');
});
});
How can I do :contain insensitive in this case? Can someone help me please? Thanks