This commit is contained in:
Baris Soner Usakli
2013-07-24 12:33:37 -04:00
parent 762cecf1c3
commit f7217f2d12
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}