javascript - Make element appear after scrolling -


When a page goes to a certain y position, I try to reveal an element I am doing this, but it appears after reloading the page and then stays on the page and does not disappear.

  var showScroll = function () {var url = document.URL; Var urlToTest = 'http: // localhost: 55054 / why-napit / membership-scheme-profit'; Var divEl = document.getElementById ('Action'); If (url == urlToTest) {if (document.documentElement.scrollTop> = 800 || window.pageYoffset> = 800) {divEl.style.display = "block"; } And {divEl.style.display = "none"; }}} (); Window.addEventListener ('load', show scroll, wrong);  

I have tried scroll events but are not working, so I think I am nearby, but not enough close.

You "

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -