/scrollhide

Hide element when scrolling down, show when scrolling up.

Primary LanguageJavaScript

jQuery Scrollhide Build Status Bower Version

Hide element when scrolling down, show when scrolling up

Design pattern from Google Chrome and Safari mobile browsers. Demo for mobile device

Usage

  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  2. Include plugin's code:

    <script src="dist/jquery.scrollhide.min.js"></script>
  3. Style the element/elements:

    <nav style="position: fixed; top: 0; width: 100%; height: 50px;"></nav>
  4. Call the plugin:

    $("nav").scrollhide();

Structure

├── demo/
│   └── index.html
├── dist/
│   ├── jquery.scrollhide.js
│   └── jquery.scrollhide.min.js
├── src/
│   └── jquery.scrollhide.js
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .travis.yml
├── Gruntfile.js
└── package.json

Contributing

Check CONTRIBUTING.md for more information.

History

Check Releases for detailed changelog.

License

MIT License © Viktor Bergehall