Skip to content

Instantly share code, notes, and snippets.

@git-bhanu
Created July 20, 2020 11:49
Show Gist options
  • Save git-bhanu/7c83b73ecc5a5df3bb6616483e5a2668 to your computer and use it in GitHub Desktop.
Save git-bhanu/7c83b73ecc5a5df3bb6616483e5a2668 to your computer and use it in GitHub Desktop.
Just a header
import TweenLite from 'gsap';
const menu = document.querySelector('.hamberger');
const nav = document.querySelector('nav');
const closeMenu = document.querySelector('.menu-close');
menu.addEventListener('click', () => {
TweenLite.to(nav, 0.3,{ left: 0 })
})
closeMenu.addEventListener('click', () => {
TweenLite.to(nav,0.3, { left:'-77%' })
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment