localStorage.setItem('showPreloader', 'false')
if(localStorage.getItem('showPreloader') == false)
{
//не показываем прелоадер
} else {
//показываем
}
The read-only scrollY property of the Window interface returns the number of pixels that the document is currently scrolled vertically
The pageYOffset property is an alias for the scrollY property
An element's scrollTop value is a measurement of the distance from the element's top to its topmost visible content
#logo {
background:#ccc;
height:50px;
width:100px;
border:1px solid;
}
#logo.s0,#logo.s1,#logo.s2 {
background:#ccc111;
}
#logo.s3,#logo.s4,#logo.s5 {
background:#111ccc;
}
#logo.s6,#logo.s7,#logo.s8 {
background:#c1c1c1;
}
#logo.s9,#logo.s10,#logo.s11 {
background:#1c1c1c;
}
<div id="logo"></div>
var date = new Date();
document.getElementById("logo").classList.add('s'+date.getMonth());