[jQuery] Re: slide down animation "jumps" at the end

2008-05-06 Thread Yann

I removed all the margin/padding of the element that's being modified
to no avail... I should have mentioned that.
Thanks for the feedback!


[jQuery] slide down animation "jumps" at the end

2008-05-06 Thread Yann

I got a smilingly simple problem but I have spent way to much time
trying to fix it unsuccessfully already... Hoping some jQuery guru can
figure this one out for me...

The javascript is pretty basic:

// set defaults
$('.news_content').hide();
$('.news_item_bg div:first').show();
$('#latest_news a:first').addClass('selected');
// set news links behavior
$('#latest_news a').click(function () {
$('#latest_news a').removeClass('selected');
$(this).addClass('selected');

var target = $(this).attr('href');

 $(".news_content:visible").animate({color: '#fff'},
500).slideUp(1000, function() {
$(target).slideDown(1000).animate({color: '#fff'}, 
1000);
});
return false;
});

But when it slides down, the end of the animation is choppy, more
accurately, it seems that the height is calculated wrong during the
animation and readjusted at the end...

Anyone else has experienced this problem before? I must be doing
something wrong since Google search didn't turn anything up...

Thanks!