Sticky header using jquery
Sticky header using jquery
When you scroll down a page with a long layout on it, typically the header of the top scrolls away and becomes useless sticky header using jquery, A simple way.
<script>
var header = $("#header");
header.on("scroll", function(e) {
if (this.scrollTop > 200) {
header.addClass("fix-header");
} else{
header.removeClass("fix-search");
}
});
Fixed header area.
See demo here...
Follow On Social Media -
Follow on instagram - https://www.instagram.com/frontendissue/
Follow on Twitter - https://twitter.com/IssueEnd
Follow on Linkedin - https://www.linkedin.com/in/hitesh-patidar-34253a10a/
Follow on GooglePlus - https://plus.google.com/118238268171156252992
Follow on pinterest - https://in.pinterest.com/frontendissue/
ultimate sir
ReplyDeleteThankyou !!
ReplyDelete