]> iEval git - plack-app-gruntmaster.git/blame - js/90-nav.js
Add a class for elements that should have word-break: break-all
[plack-app-gruntmaster.git] / js / 90-nav.js
CommitLineData
4b4a8137
MG
1(function(){
2 'use strict';
3
4 var NAVS = {
5 'home': /^\/$/,
a67dc03d
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$/,
1cefad91 12 'about': /^\/about$/,
4b4a8137
MG
13 };
14
15 $( document ).ready(function(){
16 var path = location.pathname;
17 for (var nav in NAVS)
18 if(path.match(NAVS[nav])) {
19 $('#nav-' + nav).addClass('active');
20 break;
21 }
22 });
23})();
This page took 0.044994 seconds and 4 git commands to generate.