The animation produced by my jQuery function is shaky, and I\'ve been looking through different SO solutions, such as adding jquery.easing, but no luck. Is
Andrew's solution is correct, but I would still put the css like this (if javascript is off): .videoblock{width:560px; height: 315px; overflow:hidden}
and add the simultaneous animation:
$('.videoblock').css('height','0');
$(".entry-title").click(function() {
$this = $(this);
$content = $this.closest('.videotoggle').find(".videoblock");
if (!$this.is('.active-title')) {
$('.active-title').removeClass('active-title');
$this.addClass('active-title');
$(".videoblock:visible").animate({height: "0"}, { duration: 400, queue: false });
$content.animate({height: "315"}, { duration: 400, queue: false });
}
});
Here is the link to the final: http://jsfiddle.net/gwLcD/21/