ページをスクロールしながらヘッダーをフェードインしたい。これは私がこれまでに得たもので、.fadeIn() 以外はすべて機能します。
$(document).scroll(function() {
if( $(this).scrollTop() > 120 ) {
if( !fixed ) {
fixed = true;
$('.mini-logo').css({display:'block'});
$(' header ').css({background:'#323232'});
}
} else {
if( fixed ) {
fixed = false;
$('.mini-logo').css({display:'none'});
$(' header ').css({background:'rgba(0,0,0,0)'});
}
}
});