Thursday, 12 July 2018

Navbar hide or fade when scroll




<style>

#navbar-scroll {
  transition: top 0.5s; /* Transition effect when sliding down (and up) */
}

</style>


<body>
<script>
    var prevScrollpos = window.pageYOffset;
    window.onscroll = function() {
    var currentScrollPos = window.pageYOffset;
      if (prevScrollpos > currentScrollPos) {
        document.getElementById("navbar-scroll").style.top = "0";
      } else {
        document.getElementById("navbar-scroll").style.top = "-50px";
      }
      prevScrollpos = currentScrollPos;
    }

</script>
</body>

email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...