Jump to content
Search Community

Mladen

Members
  • Posts

    1
  • Joined

  • Last visited

Mladen's Achievements

0

Reputation

  1. Hello! I'm beginner in Javascript/GSAP world. Pardon me because of some elementary questions. :) I'm trying to animate a button to expand on hover. I did that. But, I would love to completely remove the animation in the certain screen sizes/media queries. Here is my code: toggleHeroBtn.to(herobutton, .7, {paddingRight:"15.3rem", paddingLeft:"15.3rem", ease: Power1. easeOut}); herobuttonImg.addEventListener('mouseenter', _ => { toggleHeroBtn.play(); }); herobuttonImg.addEventListener('mouseleave', _ => { toggleHeroBtn.reverse(); }); Thank you in advance!!
×
×
  • Create New...