7

オブジェクトで単純なslideUpアニメーションを実行しています。アニメーションが完了したら、要素に属性タグを追加したいと考えています。どうすればこれを機能させることができますか?

if($(this).is(':visible')) {
  if(config.animate=='true')                    
    $(this).slideUp(options.animationTime);   //After animation ends do $(this).attr('shown','true');
  else 
    $(this).hide();             
}
4

1 に答える 1

12
$(this).slideUp(options.animationTime, function() {
    $(this).attr('shown','true');
}); 
于 2012-04-06T06:37:37.693 に答える