0
ために機能する追加I持っ/アウトDIVフェードイン次の作業コード/ボタン第二 '作用' は異なるDIV
JS
jQuery(document).ready(function($){
var offset = 150,
// duration of the animation (in ms)
scroll_top_duration = 3000,
// bind with the button link
$animation = $('.fade-in');
// display or hide the button
$(window).scroll(function(){
($(this).scrollTop() > offset) ? $animation.addClass('btn-visible') :
$animation.removeClass('btn-visible');
});
});
HTML
<div id='top-btn'>
<a class="fade-in" href="#">...</a>
</div>
I反対の順序で別のdivに同じクラス(.btn-visible)を追加/削除したいが、それを動作させるように見えない。
他のdivが.fadeインがあればブロック内の両方のアクションを使用しない理由
'$(this).scrollTop()<= offset)? removeClass( 'btn-visible'); ' – Abhitalks
その行はどこにあるのでしょうか?ブロック? – user3550879
既存のものの直後。 – Abhitalks