Make Header Navigation Sticky On Scroll Up - Shy Header

File Size: 4.86 KB
Views Total: 2598
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Make Header Navigation Sticky On Scroll Up - Shy Header

Shy Header is a smart sticky menu jQuery plugin that hides the header navigation on scroll down and makes it always be visible on scroll up.

How to use it:

1. Create a header navigation for your site.

<header class="header">
  Header Navigation Here

2. Include the Shy Header plugin after loading jQuery JavaScript library.

<script src="" 
<script src="js/jquery.shyheader.js"></script>

3. Initialize the plugin on the header navigation.

$(function () {

4. The CSS to stick the header navigation to the top on scroll up.

.shy-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  -webkit-transition: all 200ms ease-out;
  transition: all 200ms ease-out;

5. The CSS for the show/hide animations.

.is-watching {
  -webkit-transform: translate3d(0,-100%,0);
  transform: translate3d(0,-100%,0);

6. Sometimes you might need to add an offset to the main container.

$(function () {

This awesome jQuery plugin is developed by alejandromur. For more Advanced Usages, please check the demo page or visit the official website.