Skip to content

Commit

Permalink
optional gumby-persist attribute to keep navbar open after link clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Dec 2, 2013
1 parent 4eea4fa commit 6812110
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/libs/ui/gumby.navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
this.$dropDowns = this.$el.find('li:has(.dropdown)');
var scope = this;

this.$el.find('li:not(:has(.dropdown)) a').on(Gumby.click, function() {
scope.$el.find('ul').removeClass('active');
});
var persist = this.$el.attr('gumby-persist');
console.log(persist);
if(typeof persist === 'undefined' && persist !== 'false') {
this.$el.find('li:not(:has(.dropdown)) a').on(Gumby.click, function() {
scope.$el.find('ul').removeClass('active');
});
}

// when navbar items
this.$dropDowns
Expand Down

0 comments on commit 6812110

Please sign in to comment.