So this might be really simple, but I haven\'t been able to find any examples to learn off of yet, so please bear with me. ;)
Here\'s basically what I want to do:>
You can smooth out the jQuery animation using dequeue. Test for presence of class (set upon hover and removed on mouseOut animate callback) before staring new animation. When new animation does start, dequeue.
Here's a quick demo.
var space = ($(window).width() - 100);
$('.column').width(space/4);
$(".column").click(function(){
if (!$(this).hasClass('animated')) {
$('.column').not($(this).parent()).dequeue().stop().animate({width: 'toggle', opacity: '0.75'}, 1750,'linear', function () {});
}
$(this).addClass('animated');
$('.column').not($(this).parent()).dequeue().stop().animate({width: 'toggle', opacity: '0.75'}, 1750,'linear', function () {
$(this).removeClass('animated').dequeue();
});
$(this).dequeue().stop().animate({
width:(space/4)
}, 1400,'linear',function(){
$(this).html('AGAIN');
});
});
The demo is setup as 5 full-height columns, clicking any of the columns 2 thru 5 will animate toggle width of the other 3 and move the clicked element to the far left.

