Guest User

Untitled

a guest
Jan 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import $ from 'jquery';
  2.  
  3. class Nav {
  4. constructor($el) {
  5. this.$el = $el;
  6. this.$menuButton = $el.find('.navigation-hamburger');
  7. this.$navMenu = $el.find('.navigation-menu');
  8.  
  9. this.attachHandlers();
  10. this.openMenu();
  11. }
  12.  
  13. attachHandlers() {
  14. this.$menuButton.on('click', function() {
  15. this.openMenu();
  16. });
  17. }
  18.  
  19. openMenu() {
  20. console.log('Open menu')
  21. }
  22. }
  23.  
  24. export default Nav;
Add Comment
Please, Sign In to add comment