jQuery: Slide animation goes to far, then “jumps” to the right height

party5animal

New Member
I've seen a few questions about a similar issue, but I haven't found a solution that makes sense to me yet. The problem is on my site: http://twchapman.comJSFiddle here, stripped down with the same issue: http://jsfiddle.net/twchapman/EEXjR/2/The functions I wrote:\[code\]function changeTab(tab) { active = tab; $("#" + tab).slideDown(animspeed);}function change(tab) { if (tab == active) return; $("#" + active).slideUp(animspeed, function () { changeTab(tab); });}\[/code\]I'm only using Chrome, but I'm pretty sure you'll get this error on any browser: when the page loads, it slides the content div down, and clicking the links (only Portfolio actually works at the moment) will slide the current div up, then the correct one down.It's working almost completely as intended, but with one minor issue: when the animations begin, the div's height "jumps", and it's momentarily taller while the animation takes place, then "jumps" to the correct size when finished.The two common solutions I've found have suggested: 1. Add a width to the style of the div, which already exists, and 2. change the height/margin parameters of the slide function when it's called. To me, the second solution seems like it shouldn't be necessary, as I don't provide any options other than an animation length.I'm hoping this is just me missing something and being silly, not a big problem with the way I'm doing things.
 
Back
Top