Penumbra
Penumbra

Reputation: 85

What is causing this simple animation script to animate improperly?

I cannot seem to figure out what is making this script go wrong...

You can find a properly animated version of the script here... http://jsfiddle.net/tTJaM/21/

You may find the live project version here... http://jsfiddle.net/tTJaM/22/

The live project is located at http://paysonfirstassembly.com/

As you can see, the animation does not have the same visual effect in the second link. The visual effect I wish to achieve is the one in the first link. I am willing to edit the script to do this, or make changes to the CSS that I did not make initially.

Upvotes: 2

Views: 78

Answers (2)

Tom Chandler
Tom Chandler

Reputation: 642

It looks like the min-height:120px; attribute of .dynPanelContent is what's causing it. If you remove that style, it does the rotation properly, but the boxes are no longer properly sized.

The slideUp function is an animation that modifies height, but not min-height. This is a known issue in jQuery and there's a wiki entry on Getting Around The Minimum Height Glitch

Upvotes: 0

Jull
Jull

Reputation: 271

min-height:120px; in .dynPanelContent in your css doesn't let it work properly. But I don't really understand why... If you remove it, everything works at least here http://jsfiddle.net/tTJaM/22/

Upvotes: 1

Related Questions