2017-03-03 10 views
0

を使用するとき、どのように私はあなたがjQueryフェードインを使用することができどのように私はdiv要素は、遷移関数に

$('.masthead').visibility({ 
 
    once: false, 
 
    onBottomPassed: function() { 
 
    $('.fixed.menu').transition('fade in'); 
 
    $('.fixed.menu').animate({ 
 
     height: 80 
 
    }, 500); //animate the menu to the width of 80 
 
    }, 
 
    onBottomPassedReverse: function() { 
 
    $('.fixed.menu').animate({ 
 
     height: 50 
 
    }, 500); //animate the menu back to the original width 
 
    $('.fixed.menu').transition('fade out'); 
 
    } 
 
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 

 
<div class="masthead"> 
 
<div id="fixed-menu"> 
 
</div> 
 

 
</div>

+0

[mcve]を作成するには '<>'をクリックしてください - あなたが求めているものは明確ではありません – mplungjan

答えて

0

遷移関数を使用するときにdiv要素が遅くフェードアウトすることができます遅いフェードアウトすることができます()とフェードアウト()

$(".fixed.menu").fadeIn("slow"); 

$(".fixed.menu").fadeOut("slow"); 
関連する問題