Animation on hover


Topic: Animation on hover

demzl25 pro asked 4 years ago

Hi,  i would like to add animation on hover and i have found this java script that triggers animation on one event  but i would like that every time i hover on element animation triggers! What is missing in this java script or i can accomplish this with css? <script> $(document).ready(function(){ $('.logo').hover(function(){ $(this).addClass('animated pulse') }); }); </script>

Marta Szymanska staff pro premium answered 4 years ago

Hi, change .addClass to .toggleClass and it will work. Best, Marta
Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No