0

I'm trying to make some icons jump on hover using CSS3 and Jquery. The bounce animation is attached to the .bounce class in a stylesheet; to handle the hover, I told Jquery to add and remove the bounce class when the mouse enters and leaves the image's parent element respectively. While the Jquery is working as expected, the animation is not, and I'm not sure why.

Here's the fiddle. I appreciate the help.

1

2 Answers 2

3

You're missing the animation-duration:

.bounce {    
    // this is the shorthand definition
    -webkit-animation: bounce 1s ease infinite;
    -moz-animation: bounce 1s ease infinite;
    -o-animation: bounce 1s ease infinite;
    animation: bounce 1s ease infinite;
} 

http://jsfiddle.net/fyTpV/2/

Sign up to request clarification or add additional context in comments.

2 Comments

he's using someone elses css I think. The class Animated has those values in it. It just need to be put on the elem to animate.
That did it! Thanks a lot. I'd assumed that the css sheet generated for me would have the timing already built into it. I've never used CSS3 animations before, so I didn't even think to check that.
0

You need to add the animated class. Here's the updated fiddle http://jsfiddle.net/fyTpV/3/ add the class to the elem you wish to animate or in your add class add the animated class as well.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.