Add class to <li> based on content of link in <li>
<p>I've added a custom JavaScript file to my header via <code>functions.php</code> and the file is linked fine when I check the source code (listed well below the main call to jQuery). Within the custom JavaScript file I have added the following:</p>

<pre><code>$(document).ready(function(){
    $('li.bawmrp_manual &gt; a:contains[href*="/project/"]').addClass('bawmrp_gallery');
});
</code></pre>

<p>I've tried numerous variations. What I'm trying to do is add the class <code>bawmrp_gallery</code> to the <code>&lt;li&gt;</code> if the link within it contains the text <code>project</code>. Can anyone help?</p>
