]>
Commit | Line | Data |
---|---|---|
4b4a8137 MG |
1 | (function(){ |
2 | 'use strict'; | |
3 | ||
4 | var NAVS = { | |
5 | 'home': /^\/$/, | |
3825b4b1 MG |
6 | 'pb': /^\/(?:pb|sol)\//, |
7 | 'ct': /^\/(?:ct|st|ed)\//, | |
4b4a8137 | 8 | 'log': /^\/log\//, |
bc8a492d MG |
9 | 'us': /^\/us\//, |
10 | 'account': /^\/account$/, | |
f1ca2771 | 11 | 'contribute': /^\/contribute$/, |
4b4a8137 MG |
12 | }; |
13 | ||
14 | $( document ).ready(function(){ | |
15 | var path = location.pathname; | |
16 | for (var nav in NAVS) | |
17 | if(path.match(NAVS[nav])) { | |
18 | $('#nav-' + nav).addClass('active'); | |
19 | break; | |
20 | } | |
21 | }); | |
22 | })(); |