私すべては私のメニューとアンカーポイントでうまく働くが、リンクは動作を停止し、次のコードを追加した後、持っていた:アンカーポイント
$('#fullpage').fullpage({
onLeave: function(index, nextIndex, direction){
var leavingSection = $(this);
//after leaving section 2
if(index == 1 && direction =='down'){
$('header').addClass('active');
}
else if(index == 2 && direction == 'up'){
$('header').removeClass('active');
}
}
});
私の意図は、私のヘッダーを非表示にすることであり、唯一の2番目のセクションの後に表示されますが、アンカーポイントはもう動作しません。
私のヘッダーHTML
<header>
<ul id="myMenu">
<li data-menuanchor="topo" class="active"><a href="#topo"><img src="img/dcb-white.svg"></a></li>
<li data-menuanchor="contato"><a href="#contato">Contato</a></li>
<li data-menuanchor="sobre"><a href="#sobre">Sobre Mim</a></li>
<li data-menuanchor="historico"><a href="#historico">Histórico</a></li>
<li data-menuanchor="portfolio"><a href="#portfolio">Portfolio</a></li>
<li data-menuanchor="topo" class="active"><a href="#topo">Topo</a></li>
</ul>
</header>
ヘッダーCSS
header{
position:fixed;
height: auto;
display:block;
width: 100%;
background: #000;
z-index:9;
text-align:center;
color: #fff;
top:0px;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.8s;
-moz-transition: all 0.8s;
transition: all 0.8s;
}
header.active {
visibility: visible;
opacity: 1;
-webkit-transition: all 0.8s;
-moz-transition: all 0.8s;
transition: all 0.8s;
}