var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
// document.querySelector(“#cb-row–header-main > div”).style.height = “120px”
document.querySelector(“#cb-row–header-main > div”).style.transition = “250ms”
document.querySelector(“#cb-row–header-main”).style.transition = “250ms”
document.querySelector(“.header–row.header-main .customify-grid, .header–row.header-main .style-full-height .primary-menu-ul > li > a”).style.transition = “250ms”
if(window.scrollY < 50 ){
document.querySelector(“#cb-row–header-main > div”).style.minHeight = “120px”
document.querySelector(“.header–row.header-main .customify-grid, .header–row.header-main .style-full-height .primary-menu-ul > li > a”).style.minHeight =”120px”
} else {
document.querySelector(“#cb-row–header-main > div”).style.minHeight = “80px”
document.querySelector(“.header–row.header-main .customify-grid, .header–row.header-main .style-full-height .primary-menu-ul > li > a”).style.minHeight =”80px”
}
// console.log(“Prev: ” + prevScrollpos)
// console.log(“Current: ” + currentScrollPos)
// if (prevScrollpos > currentScrollPos) {
// //going up
// // document.getElementById(‘cb-row–header-main’).style.display= “block”;
// document.getElementById(‘cb-row–header-main’).style.opacity= “1”;
// document.getElementById(‘cb-row–header-main’).style.visibility= “visible”;
// document.querySelector(“#cb-row–header-main > div”).style.height = “120px”
// } else {
// //going down
// if(currentScrollPos > 120) {
// document.querySelector(“#cb-row–header-main > div”).style.height = “80px”
// document.getElementById(‘cb-row–header-main’).style.opacity= “1”;
// // document.getElementById(‘cb-row–header-main’).style.visibility= “hidden”;
// // document.getElementById(‘cb-row–header-main’).style.display= “none”;
// }
// }
prevScrollpos = currentScrollPos ;