我很难在一个刚刚完成后让另一个功能工作。我的代码的前半部分起作用,但之后的功能不起作用。我究竟做错了什么?继续执行一个功能
的HTML
<div id="feature">
<div id="open"></div>
</div>
的CSS
#feature {
position:relative;
width:100%;
height:450px;
}
#open {
position:relative;
width:100%;
height:200px;
background:red;
}
jQuery的
$('#open').click(function() {
$(this).animate({
height: 50
}, {
duration: 'slow'
}).css('overflow', 'visible'),
function() {
$('#open').animate({
height: 200
}, {
duration: 'slow'
})
};
// Animation complete.
});
一个JS提琴。
http://api.jquery.com/animate/ ** complete **:动画完成后调用的函数。 – 2013-04-21 23:59:59