My code to add a class based on the current page is not working. Can you help me work out why?
var url = window.location.pathname,
urlRegExp = new RegExp(url.replace(/\/$/,'') + "$"); // create regexp to match current url pathname and remove trailing slash if present as it could collide with the link in navigation in case trailing slash wasn't present there
// now grab every link from the navigation
// and test its normalized href against the url pathname regexp
See this url: http://new2.jensonfisher.com/about-us/values/
Look at the sub navigation below the image.