]>
Commit | Line | Data |
---|---|---|
7093e9ba MG |
1 | var NAVS = { |
2 | 'home': /^\/$/, | |
3 | 'pb': /^\/(?:pb|sol)\//, | |
4 | 'ct': /^\/(?:ct|st|ed)\//, | |
5 | 'log': /^\/log\//, | |
6 | 'us': /^\/us\//, | |
7 | 'account': /^\/account$/, | |
8 | 'contribute': /^\/contribute$/, | |
9 | }; | |
4b4a8137 | 10 | |
7093e9ba MG |
11 | $(function(){ |
12 | var path = location.pathname; | |
13 | for (var nav in NAVS) | |
14 | if(path.match(NAVS[nav])) | |
15 | $('#nav-' + nav)[0].classList.add('active'); | |
16 | }); |