Skip to content

A lightweight javascript plugin for hiding and showing your navigation when scrolling down your page.

Notifications You must be signed in to change notification settings

eldelentes/shyo.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

shyo.js

A lightweight javascript plugin for hiding and showing your navigation when scrolling down your page.

Basic Usage

  • Include the shyo.css and shyo.js on your document's <head> and <body>

    <head>
      <link rel="stylesheet" href="shyo.css">
    </head>
    <body>
    	<script src="shyo.js"></script>
    </body>
  • Add the class shyo and the id shyo to the element you want to hide:

<header id="shyo" class="main-header shyo" data-scroll="0">

You may also want to modify the data-scroll to define when de script starts working.

  • Activate the script.

     <script>
     	$('#shyo').shyo();
     </script>

Customization

You can change the style and duration of your animations in the .shyo and .shyo-up class.

.shyo {
	/* Default Animation */	
	transform: translateY(0%);
	opacity: 1;  
}

.shyo-up {
	/* Default Hide Animation*/	
	transform: translateY(-100%);
	opacity: 0;	
}

Notes

Shyo uses the position: fixed css property so you maybe need to add:

	.your-header {
		width: 100%;
	}

License

shyo.js is licensed under the MIT license. (http://opensource.org/licenses/MIT)

Contributing

Pull requests are allowed, I apologize in advance for the issues.

About

A lightweight javascript plugin for hiding and showing your navigation when scrolling down your page.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published