I've added a custom JavaScript file to my header via functions.php 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:
$(document).ready(function(){
$('li.bawmrp_manual > a:contains[href*="/project/"]').addClass('bawmrp_gallery');
});
I've tried numerous variations. What I'm trying to do is add the class bawmrp_gallery to the <li> if the link within it contains the text project. Can anyone help?
jQuery(document).ready(function($){and the second line to the suggestion by @Kevin that may be a solution. I'll give it a try. Thank you. – Paul Brown Feb 3 at 20:19