Animation on hover


Topic: Animation on hover

demzl25 pro premium priority asked 7 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 7 years ago

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

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

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