Permalink
Browse files

Switch active tabs

  • Loading branch information...
1 parent 861c2b3 commit 6214afdc0725d1cfd41de40cf578af4ea4d789aa @akavlie akavlie committed Mar 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 public/javascripts/main.js
@@ -92,6 +92,9 @@ var NavView = Backbone.View.extend({
e.preventDefault();
var href = $(e.currentTarget).attr('href');
panel.router.navigate(href.substr(1), {trigger: true});
+ // Switch active tab display
+ this.$('li').removeClass('active');
+ $(e.currentTarget).parent().addClass('active');
}
});

0 comments on commit 6214afd

Please sign in to comment.