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");
  } 
});
</script> 


More information please visit this url https://www.papawebdesigner.com/
https://www.papawebdesigner.com/




Fixed header area. 

See demo here...

Sticky header using jquery
























Follow On Social Media -


Follow on Facebook   -  https://www.facebook.com/Front-End-Issue-487743404963344
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/


Comments

Post a Comment

Popular posts from this blog

Owl carousel center mode with zoom image

Add (+/-) Button Number Incrementers using jQuery

What is difference between click and onclick in jquery