The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQ: slideToggle animation skips/jumps Re: jQ: slideToggle animation skips/jumps


I’ll tell you what, it took me 2 days of critical thinking and LOTS of trial and error, but I finally solved this problem. I’ve had the same issue. The answer is NOT the famous padding issue that makes it jump. Through some research I believed that to have been solved on jQuery 1.3.2 or something.

The problem is with the width. ANY time the element .slideToggle( ) is attached to has a width it’ll skip/jump the ending. How much it does depends on the width. The narrower the width, the more the jump. Anyways, long story short, by adding position:relative onto the div the sliding element is in, it’ll reset the width as far as .slideToggle( ) is concerned and will no longer jump.

I have already tested this on your link, and it fixes the entire issue. Congrats.

I am particularly proud of this solve. I put a lot of work into it. My first big issue since I started learning jquery a couple weeks ago.