From f7217f2d1253a4ee612a352788b2e219c5cd4090 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 24 Jul 2013 12:33:37 -0400 Subject: [PATCH] closes #130 --- public/src/app.js | 6 +++--- public/templates/header.tpl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/app.js b/public/src/app.js index 5157291698..fc8304571d 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -234,13 +234,13 @@ var socket, parts = url.split('/'), active = parts[parts.length-1]; - jQuery('.nav li').removeClass('active'); + jQuery('#main-nav li').removeClass('active'); if(active) { - jQuery('.nav li a').each(function() { + jQuery('#main-nav li a').each(function() { var href = this.getAttribute('href'); if(active.match(/^users/)) active = 'users'; - if (href.match(active)) { + if (href && href.match(active)) { jQuery(this.parentNode).addClass('active'); return false; } diff --git a/public/templates/header.tpl b/public/templates/header.tpl index f960144fdf..b193223431 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -45,7 +45,7 @@