2014-01-28 39 views

回答

1
$('#myDiv').animate({ 
    'width': 0 
}, 2000, 'linear'); 

http://jsfiddle.net/HqELS/2

你不会需要隐藏它,因为它是已经无形由于宽度= 0

+0

啊,就是这样。谢谢。 –

1
$('#box').animate({width: "toggle" }); 

$('#box').animate({width: 0 }); 

LIVE EXAMPLE