Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery: do after complete animate doesn't work

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

it doesn't show animation. i guess that i have put a function is wrong place.

like image 350
user453089 Avatar asked Dec 21 '22 14:12

user453089


1 Answers

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();
    }
});
like image 129
T.J. Crowder Avatar answered Jan 08 '23 05:01

T.J. Crowder