I'm using a navigation bar, and I want to have an active class on elements when they're on the element's page.
For instance, I'd need jQuery to check the url of the current page, and if the url is http://supjamess.tumblr.com/, it'd add the class active to the a element .index, http://supjamess.tumblr.com/ask & it'd add the class active to the a element .ask, and so on.
If anyone could provide a code it'd be extremely helpful.