日期:2014-05-16 浏览次数:20375 次
$('div').animate(width:'300px',300,function(){ alert('ok'); });
$('div').animate(width:'300px',{ duration: 300, queue: false }); $('span').animate(width:'300px',{ duration: 300, queue: false }); $('p').animate(width:'300px',{ duration: 300, queue: false },function(){ alert('ok'); });
$('div').animate({ width: '300px', duration: 300, queue: false }); $('span').animate({ width: '300px', duration: 300, queue: false }); $('p').animate({ width: '300px', duration: 300, queue: false }, function() { alert('ok'); });
------解决方案--------------------
//更加规范点的写法 $("div").animate({ width: '300px' }, { duration: 300, queue: false }); $("span").animate({ width: '300px' }, { duration: 300, quequ: false }); $("p").animate({ width: '300px' }, { duration: 300, queue: false, complete: function() { alert('OK'); } });