How to hide DIV when scroll reach at Bottom through CSS?

css, html, javascript

Solution

Guess you want a pure javascript solution now you havent included the tag jquery?

<div id="N_fixedBottom">bla bla</div>

script :

document.onscroll = function() {
    if (window.innerHeight + window.scrollY > document.body.clientHeight) {
        document.getElementById('N_fixedBottom').style.display='none';
    }
}

Problem

This is my div `style` ``` <style> #N_fixedBottom { position:fixed; bottom:0px; left:0px; right:0px; background-color:#004369; width:100%; height:20px; z-index:100; } </style> <div id="N_fixedBottom"> </div> ``` This `div` should hide when it scroll down to the bottom of page. Because this DIV is hiding my footer.

Original source