I'm trying to make a navigation bar with highlighted tabs. It works when I specifically click the tab, but if I come to the page from an outside link, I can't get the tab to highlight. How could I say something like:
$("#navbar a").each(function(){ if(this.href *like* window.location) (this).addClass("selected") } What do I put in place of *like*? Or if you know another good way to do it, that would be helpful. Thanks in advance.