Basic jQuery slideUp and slideDown driving me mad! Basic jQuery slideUp and slideDown driving me mad! jquery jquery

Basic jQuery slideUp and slideDown driving me mad!


I must admit I've found my own dynamic solution now.

http://www.mizudesign.com/jquery/accordian/basic.html should be fixed.

It's very simple really - just adds the height using .css before hiding the div.Works a treat :)

$("#PlayerButtonsContent div").each (function() {$(this).css("height", $(this).height());});$("#PlayerButtonsContent div").hide();


You need a width or height on the content for it to animate smoothly.


I think the problem is, that when padding or margin is added then it jumps, this was the case by me. you have to animate the margin in the callback

Also "keep in mind" that tables behave buggy with slideDown slideUp and rather use fadeIn fadeOut