Hi there, I've following code to highlight the current link in my menu: var path = location.pathname.substring(1); if (path != '') { $('#navigation [EMAIL PROTECTED]"' + path + '"]').css('color','#c03'); } else { $('#navigation [EMAIL PROTECTED]"/"]').css('color','#c03'); }
But some files/pages have similar names like: potatoes.html fried-potatoes.html The second page highlights the first link (potatoes.html) as well. What's wrong of course. How can I make this bulletproof? Is it possible only to match the exact filename? I would be really glad if someone can help! Regards suntrop