Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import $ from 'jquery';
- class Nav {
- constructor($el) {
- this.$el = $el;
- this.$menuButton = $el.find('.navigation-hamburger');
- this.$navMenu = $el.find('.navigation-menu');
- this.attachHandlers();
- this.openMenu();
- }
- attachHandlers() {
- this.$menuButton.on('click', function() {
- this.openMenu();
- });
- }
- openMenu() {
- console.log('Open menu')
- }
- }
- export default Nav;
Add Comment
Please, Sign In to add comment