scrolleventjavascript1

 <html>

    <head>
<title>facebook.com</title>
    </head>
    <style>
        div{
            background-colorgreen;
            width200px;
            height200px;

        }
        body{
            height2000px;
        }
    </style>
    <body>
       <div id='a'>

       </div>
       <script>
           window.addEventListener('scroll',
function(){
               if(document.body.scrollTop>350){
                   document.getElementById('a')
.style.display="none";
               }
           
           })
           </script>
    </body>
</html>

Comments

Popular posts from this blog

interview questions js[ Anurag Singh ProCodrr]

reactnative_creation