dementrock
dementrock

Reputation: 937

jQuery.show() problem

See the page at: http://216.231.135.200/test/view.html

As you click 'Next', the next bar will first extend and then contract back, which is not the effect I want. Can anyone help me?

--Update:

He means when the animation is done, the bottom part of the element judders. He wants to prevent that. – lolwut

Upvotes: 0

Views: 251

Answers (4)

Naftali
Naftali

Reputation: 146302

Solved it with some css: http://jsfiddle.net/maniator/VLSc9/

.step-container {
    display: none;
    font-size: 18px;
    margin-bottom: 20px;
    margin-top: 20px;
    height: 21px; /*stops the jitter */
    max-height: 21px; /*stops the jitter*/
}

Upvotes: 3

sg3s
sg3s

Reputation: 9567

Instead of show() try slideDown() maybe thats what you mean?

You can find a list of other animations/effects on the jquery api documentation page

Else please specify your expected behaviour.

It seems jQuery can't calculate correctly which height the new container needs to have, if you can specify a height for the container it should be fixed...

Upvotes: 1

beefyhalo
beefyhalo

Reputation: 1821

I think the best solution is to explicitly give all the div.step-container a height using css.

Upvotes: 4

IOrlandoni
IOrlandoni

Reputation: 1828

Give your .step_container class a fixed height.

Upvotes: 3

Related Questions