Joined December 2012
·
Simon Sturgess
Posted to
Rid yourself of jumps caused by collapsing margins on hidden elements
over 1 year
ago
Nice, but I would use CSS animations over jQuery ones to help improve performance. Although it requires a little more work to calculate heights etc. as slideDown() does all that for you.
Or even better create a class of cf and then use a pseudo element to clear the floats. So the container holding the floats has a class of cf and in your styles use:
.cf:after {
content:"";
clear:both;
display:block;
}