开发者

jQuery: do after complete animate doesn't work

开发者 https://www.devze.com 2023-03-06 05:24 出处:网络
$comment.animate({width: 0}, {queue:false, duration:450 }, function() { //$comment.css({ \'display\': \'block\' })
$comment.animate({width: 0}, {queue:false, duration:450 }, function() { 
//$comment.css({ 'display': 'block' })
$comment.hide();
 });

it doesn't show animation. i guess that开发者_JAVA百科 i have put a function is wrong place.


Per the docs, if you specify options, include the callback in the options rather than separately:

$comment.animate({width: 0}, {
    queue:    false,
    duration: 450,
    complete: function() { 
        //$comment.css({ 'display': 'block' })
        $comment.hide();
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消