Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  14] [ 4]  / answers: 1 / hits: 121787  / 13 Years ago, tue, october 18, 2011, 12:00:00

I have a script on jsfiddle: http://jsfiddle.net/kX7b6/



Nothing happens on hover



On hover I want the green box to overlap the red box with a negative margin -50px. Nothing happens.



The animation works, but not margin



Just to show that the animation itself is working i added a opacity function to the animation. margin-top is set to 0px inline as far as I can see.


More From » jquery

 Answers
12

You had MarginTop instead of marginTop



http://jsfiddle.net/kX7b6/1/



It is also very buggy if you leave mid animation, here is update:



http://jsfiddle.net/kX7b6/3/



Note I changed it to mouseenter and mouseleave because I don't think the intention was to cancel the animation when you hover over the red or green area.


[#89559] Monday, October 17, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jazminuniquer

Total Points: 63
Total Questions: 121
Total Answers: 96

Location: Cambodia
Member since Thu, May 21, 2020
4 Years ago
;