Skip to content

Commit

Permalink
Switch active tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
akavlie committed Mar 6, 2012
1 parent 861c2b3 commit 6214afd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/javascripts/main.js
Expand Up @@ -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');
}

});
Expand Down

0 comments on commit 6214afd

Please sign in to comment.