2016-10-14 11 views

答えて

2

セマンティックUIのすべてのアニメーションでは、修飾子inまたはoutを使用してアニメーションを内側または外側に強制することができます。

// Will fade out the leaf if it's visible, otherwise fades in. 
$('.autumn.leaf').transition('fade'); 

// Will always fade in the leaf. If it's visible, it will first hide it immediately, then fade it in. 
$('.autumn.leaf').transition('fade in'); 

// Will always fade out the leaf. If it's hidden, it will first show it immediately, then fade it out. 
$('.autumn.leaf').transition('fade out'); 

私は個人的にあなたがそれらを避けるためお勧めします - あなたの代わりに、要素の現在の可視性を認識し、普通のfade変遷使用する必要があります。

// Only fade in the leaf if it's hidden, otherwise do nothing. 
if ($('.autumn.leaf').hasClass('hidden')) { 
    $('.autumn.leaf').transition('fade'); 
} 
関連する問題