function appearOnScroll(element) {
const elementHeight = element.offsetHeight;
const elementPosition = element.getBoundingClientRect().top;
hideElement(element)
window.addEventListener('scroll', e => {
console.log(window.pageYOffset);
if (window.pageYOffset >= elementPosition) {
showElement(element);
window.removeEventListener('scroll', this);
}
});
}