Code Monkey home page Code Monkey logo

bootstrap-4-multi-dropdown-navbar's Introduction

Bootstrap 4 Responsive Navbar with Multi level Dropdowns

==========================

Tested on Bootstrap 4.1.3 and jQuery v3.1.1. Check this Demo

In Desktop

desktop

Mobile device

mobile

==========================

Usage

  1. Add css header for caret right icon <link href="css/bootstrap-4-navbar.css" rel="stylesheet">
  2. Add js for navbar events after include jquery and bootstrap js files <script src="js/bootstrap-4-navbar.js"></script>

Credits: fontenele

bootstrap-4-multi-dropdown-navbar's People

Contributors

ataurr avatar navidmansuri5155 avatar quique avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-4-multi-dropdown-navbar's Issues

(Suggestions) Change the arrow when an item is expanded

Nice tool. Few suggestions (not really an issue)

  1. Tell the user how to show the colors of sub-menu items
  2. When an item is expanded, change the arrow from down to right (maybe)
  3. Place license file as in License.txt

Thank you for a good software.

License missing

Can You please add a license declaration to You zip. In some countries no license means that use is not free

Bootstrap 4 beta

Really love this, but am trying with latest Bootstrap 4.0 beta and the clickable version is not working, the first Submenu under the "Dropdown Link" closes when you click on it. Will there be an update? Thank you.

(Suggest)Add option for dropleft

add option for let dropdown menu shows in left of offset parent,
ex.

    todo: change the last "if" in the click event handler into :

        if ( !$parent.parent().hasClass( 'navbar-nav' ) ) {
            if($parent.hasClass("dropleft")){
                $el.next().css( { "top": $el[0].offsetTop, "left": -($el.next().outerWidth() - 4) } );//left
            }else{
                $el.next().css( { "top": $el[0].offsetTop, "left": $parent.outerWidth() - 4 } );//right
            }
        }
    

Support for dropdown-menu-right

This is very nice! Only catch is that it doesn't work with dropdown-menu-right (dropdown aligned with the right of the container not the left). This results in sub-menus disappearing off the side of the page.

However - it's easy to fix. Change this (bootstrap-4-navbar.js, line 25):

if ( !$parent.parent().hasClass( 'navbar-nav' ) ) {
$el.next().css( { "top": $el[0].offsetTop, "left": $parent.outerWidth() - 4 } );
}

to this:

if (!$parent.parent().hasClass('navbar-nav')) {
var $drop = $el.next();
if ($drop.hasClass('dropdown-menu-right')) {
$drop.css({ "top": $el[0].offsetTop, "right": $parent.outerWidth() - 4 });
} else {
$drop.css({ "top": $el[0].offsetTop, "left": $parent.outerWidth() - 4 });
}
}

And if the sub-menu has the dropdown-menu-right class it'll be placed on the left rather than the right side of the parent dropdown.

Search

Please add search functionality, icons at the end of each menu, menu header

hover

hello guys i didnot find anythink about it how can be hoverable thank you

navbar is cutted when item number increses

If there are many items in the navbar they are rendereded over the right border of the window and are not visibile. It may happens when the items are generated dinamically.
I prefer if it wraps to new line as with primefaces menubar (https://www.primefaces.org/primeng/#/menubar)

<nav class="navbar navbar-expand-md navbar-light bg-light">

  <div class="collapse navbar-collapse" id="navbarNavDropdown">

    <ul class="navbar-nav">

      <li class="nav-item">

        <a class="nav-link" href="#">Item 1</a>

      </li>

      ...

      <li class="nav-item">

        <a class="nav-link" href="#">Item N</a>

      </li>

    </ul>

  </div>

</nav>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.