Created
August 19, 2016 14:17
-
-
Save luizcarraro/d46169b151682d59adda9d4b8c4e92c4 to your computer and use it in GitHub Desktop.
Collapse Bootstrap Navbar on Ember or Any Single page application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didRender() { | |
Ember.$('.nav li a').on('click', function(clicked) { | |
if (!Ember.$(this).hasClass("dropdown-toggle")) { | |
Ember.$('.navbar-collapse').collapse('hide'); | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment