Code Monkey home page Code Monkey logo

bootnavbar's Introduction

BootNavbar

license

Table of contents:

Introduction

Bootstrap 5 Responsive Navbar with Multi-level Dropdowns This is a fully responsive multilevel dropdown (Treeview menu) navbar opened on hover.

โš ๏ธ If you are using Boostrap 4 use v1.0.2 and read docs

Preview

Multi level hover dropdown Navbar for bootstrap 5

BootNavbar Demo

View Demo

Requirement

  • boostrap 5
  • animated.css (optional)

Download

Download source

BootNavbar CDN

css

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/gh/kmlpandey77/[email protected]/css/bootnavbar.css"
/>

js

<script src="https://cdn.jsdelivr.net/gh/kmlpandey77/[email protected]/js/bootnavbar.js"></script>

How to use

To use BootNavbar on your website, simply drop the stylesheet into your document's <head>.

<head>
  <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
  <link rel="stylesheet" href="css/bootstrap.min.css" />
  <link rel="stylesheet" href="css/bootnavbar.css" />
</head>

And, simply drop the JS into your document's <body>.

<body>
  ... ...

  <script src="js/bootstrap.min.js"></script>
  <script src="js/bootnavbar.js"></script>
  <script>
    new bootnavbar();
  </script>
</body>

And, HTML.

<nav class="navbar navbar-expand-lg navbar-light bg-light" id="main_navbar">
  ... ...
</nav>

Options

Selector

Key: selector

Type: String

Default: main_navbar

selector must be in id tag

Animation

Key: animation

Type: Boolean

Default: true

Enable/Disable animation effect

Animate In

Key: animateIn

Type: String

Default: 'animate__fadeIn'

Value can be 'animate__slideInUp','animate__zoomIn' and for more option visit animate.css

bootnavbar's People

Contributors

kmlpandey77 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bootnavbar's Issues

License

Any idea about a license ? MIT - Apache - GPL -- otherwise the use is doubtful for a user !

Does not support touch sreens

Is there anyway to fix for the touch screens. Currently its closing the expanded menu when clicked to expand on mobile.

How open by click

How to make the main menu item open by click? Now this dropdown open by hover.

bootnavbar failing - $(...).bootnavbar is not a function

For some reason I am getting an error that bootnavbar is not a function. This was working fine just yesterday. I am using the cdn for jquery and bootnavbar.

I have traced that the files are all loading but can't figure out why this error is now appearing.

It fails in Firefox and Chrome.

Any thoughts on how to fix or suggestions on how else to trouble shoot?

Issue with keyboard navigation when you have multiple sub-menus

Hi Kamal, great bit of software, however I did find a minor issue. Using your example I used the dev tools to duplicate the Dropdown 1 and called it Dropdown 2. See first screenshot.

Screen Shot 2022-09-21 at 1 55 16 PM

Then using the keyboard I tabbed to the top level item, "Dropdown" (4th item), pressed the down arrow to open up the pulldown menu and then tabbed to Dropdown 2. I then pressed the up key so focus moved to Dropdown 1, but in the process it opens up the dropdown for Dropdown 2. See second screenshot.

Screen Shot 2022-09-21 at 2 06 27 PM

Looks like the class "show" is being added to this sub-menu which might indicate a bootstrap issue.

Sorry if this sounds confusing.

Best

David

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.