SyntaxFix
Write A Post
Hire A Developer
Questions
Get the LI elments, loop through, check the HREF:
$('.menu').find('a').each(function() { if($(this).attr('href').indexOf('www.xyz.com/other/link1/')>0) { $(this).addClass('active'); } })