Reputation: 184
I'm making a website with fullPage.js and for design purposes I want the navigation only to show when scrolling. I've tried this
$(document).ready(function() {
$('#fullpage').fullpage({
//navigation
menu: '#menu',
navigation: window.addEventListener("scroll", function(){return true}),
navigationPosition: 'right',
scrollBar: true,
});
});
but it doesn't work.
Upvotes: 0
Views: 519
Reputation: 184
Based on help from @gcampbell this worked for me
var nav = document.querySelector('#fp-nav');
nav.style.display = 'none';
document.addEventListener('scroll', function () {
nav.style.display = 'inline';
setTimeout(function(){ nav.style.display = 'none'}, 1000);
});
});
Upvotes: 1