<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>
All muhaza's note in developing website. Front-end & uiux method. Real life implementation for webdesigner.
Thursday, 12 July 2018
Navbar hide or fade when scroll
Tembus Gmail dengan TXT record
Type: TXT Name: @ / domainname.com Loadtime : 14400 Value: v=spf1 a mx ip4:SERVER_IP include:netkl.org ~all
-
Press Windows + S , search for "Environment Variables" , and select: 👉 "Edit the system environment variables" Click...
-
function member_only_shortcode($atts, $content = null) { if (is_user_logged_in() && !is_null($content) && !is_feed()) { ...