PDA

View Full Version : jquery scrollTo and resize height



vinny.benson
01-27-2011, 01:00 AM
Hi,

I have a div that has aload of content in it...
and i have jquery animating the height of the div and scrolling down, problem is i want it to resize and scroll at the same time, where as at the moment it is resizing then scrolling, or if i switch the actions around, it scrolls the resizes...

is there any way i can do them both at the same time

here is my code


$("#recent").click(function() {
if( $("#recent").css("height") == '50px' ) {
$("#recent").scrollTo(250, 250).animate({ height: '500px' });
}else{
$("#recent").scrollTo( 0, 250).animate({ height: '50px' });
}
});