Smart Auto Show/Hide Bootstrap Navbar - jQuery navstrap

File Size: 16.7 KB
Views Total: 3786
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Smart Auto Show/Hide Bootstrap Navbar - jQuery navstrap

navstrap is a small jQuery plugin to create a smart Bootstrap navbar that makes the sticky Bootstrap navigation bar auto show/hide as you scroll down or up the webpage.

How to use it:

1. Put the minified version of the jQuery navstrap plugin to your Bootstrap webpage as this:

<script src="//"></script>
<script src="navstrap.min.js"></script>

2. Create a default Bootstrap navbar for your webpage.

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#navbar-top" aria-expanded="false"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
      <a class="navbar-brand" href="/">Brand</a>
    <div class="collapse navbar-collapse" id="navbar-top">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="#" data-toggle="collapse" data-target="">Contact</a></li>
        <li><a href="#" data-toggle="collapse" data-target="">About</a></li>

3. Initialize the plugin on the Bootstrap navbar. That's it.


4. Add a shadow effect to the Bootstrap navbar.

  shadow: true

5. More configuration options.

  delta: 5,
  speed: 250

Change log:


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