animate.css icon indicating copy to clipboard operation
animate.css copied to clipboard

Hover animation? Question not a issue..

Open Hero-Appelmoes opened this issue 11 years ago • 4 comments

Hello,

I'm new on GitHub and I immideatly wanted to ask something about this project. I now know how to animate things but I want to animate something if I ask on it.

BTW: This project is really in one word: awesome!

Kind regards,

Musa.

Hero-Appelmoes avatar Feb 21 '15 17:02 Hero-Appelmoes

Welcome on GitHub, The effect you want to chieve could be done by javascript(JQuery). For example you popup notification(#notification). If you click on that it fade out. You simply listen to click event. after that add desired effect with .addClass method. Do not forget add class animated before you add your desired effect.

It is also described in readme https://github.com/daneden/animate.css#usage

Hope it helps

estankovic avatar Feb 21 '15 23:02 estankovic

check below sample.

$(ABC).on('hover',function(e){
$(target).toggleClass('animation...');
});
//'ABC' is the element where you want to hover
//'target' is the element you want to apply 'animations'

Yeswanth-JG avatar Feb 23 '15 16:02 Yeswanth-JG

@CylonSK @Yeswanth-JG @Hero-Appelmoes it’s 2015 and we’re still talking about JS hover events?

Here’s how I’d recommend animating an element on hover:

.element:hover {
  animation: bounce 1s;
}

Don’t forget vendor prefixes (-webkit-animation, -moz-animation, etc.) may be necessary.

daneden avatar Feb 25 '15 01:02 daneden

@daneden Yes it's 2015 and we are still talking about JS because he did not ask about hover especially, but how to implement animate.css , so JS is still the best answer. Also I would recommend using hover with JS, because i think it is better to have all animation together for maintenance purposes.

estankovic avatar Feb 25 '15 11:02 estankovic