I need my list item elements to bounce in place and not fall all over each other.
I created a JSFiddle of what I mean: http://jsfiddle.net/RGvjj/
Can someone advise me as to why the elements are doing that and what I need to do to fix that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try removing the
inlinedisplay from the<li>and usefloat:leftinstead.Try it out: http://jsfiddle.net/RGvjj/1/
EDIT: To explain, I’m guessing this is happening because when you animate an element, jQuery changes the
displaytoblock. So you were ending up with ablockelement (the<a>) inside aninlineelement (the<li>) which doesn’t work.By using
float:left, the<li>retains itsblockdisplay, which makes it valid for the<a>to beblock.