You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
487 B
23 lines
487 B
|
|
$(document).ready( () => {
|
|
console.log('Load component - header')
|
|
|
|
const component = $('.component-header')
|
|
|
|
const hamburger = component.find('.hamburger')
|
|
const menu = component.find('.sidebar-menu')
|
|
|
|
hamburger.off('.click').on('click.click', (e) => {
|
|
const ham = $(e.currentTarget)
|
|
|
|
ham.toggleClass('is-active')
|
|
console.log(ham, menu)
|
|
|
|
if(ham.hasClass('is-active')){
|
|
menu.addClass('active')
|
|
} else {
|
|
menu.removeClass('active')
|
|
}
|
|
})
|
|
|
|
})
|