Hey everybody!
I wish you all a happy and fulfilling year 2022!
I'm currently designing a website for a brand and I've got some trouble to understand how I can apply this function bellow to all the “projects” BUT not all the pages… It's basically a function that hide/show the nav and site title on mousemove, as you can see. I have the feeling that it is simple and yet, I didn't manage to find the way.
I would appreciate the help here! :)
Cheers,
window.laytheme.on("newpageshown", function(layoutObj, type, obj) {
let idleTimer = null;
let idleState = false;
function hideNav(time) {
clearTimeout(idleTimer);
if (idleState == true) {
jQuery(".sitetitle").removeClass("inactive");
jQuery(".laynav").removeClass("inactive");
}
idleState = false;
idleTimer = setTimeout(function() {
jQuery(".sitetitle").addClass("inactive");
jQuery(".laynav").addClass("inactive");
idleState = true;
}, time);
}
hideNav(3000);
jQuery(window).mousemove(function(){
hideNav(3000);
});
});