Created
January 31, 2013 21:22
-
-
Save jblac/4686575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loc = location.pathname.replace(/\/([^.]+)\//g,''); | |
var current = $nav.find('a[href="'+loc+'"]'); | |
if(current.parent().parent().is('#nav')){ | |
current.addClass('active'); | |
}else{ | |
current.parent().parent().parent().find('a').eq(0).addClass('active').next().show(); | |
current.addClass('active'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment