jQuery Plugin To Toggle Bootstrap Dropdowns On Hover - Download jQuery Plugin To Toggle Bootstrap Dropdowns On Hover

Download jQuery Plugin To Toggle Bootstrap Dropdowns On Hover

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Toggle Bootstrap Dropdowns On Hover, hope it will help you in programming stack.

jQuery Plugin To Toggle Bootstrap Dropdowns On Hover - Download jQuery Plugin To Toggle Bootstrap Dropdowns On Hover
File Size: 46 KB
Views Total: 9170
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A simple jQuery plugin which allows the visitor to toggle Bootstrap‘s native dropdown menus on hover, on click or both.

Supports both Bootstrap 4 and Bootstrap 3 framework.

Additional features:

  • Maintains Bootstrap dropdowns’ native functions.
  • Auto close dropdown menu after a time out.

How to use it:

1. Load the jquery.bootstrap-dropdown-hover.js script in your Bootstrap project, after jQuery JavaScript library.

1 <script src="jquery.min.js"></script>
2 <script src="bootstrap.min.js"></script>
3 <script src="jquery.bootstrap-dropdown-hover.js"></script>

2. Call the function on the Bootstrap dropdown menu.

1 $('[data-toggle="dropdown"]').bootstrapDropdownHover();

3. Config the plugin.

1 // Click behavior setting:
2 // 'default': the dropdown toggles on hover and on click too
3 // 'disable: disables dropdown toggling with clicking when mouse is detected
4 // 'sticky': if we click on an opened dropdown then it will not hide on mouseleave but on a second click only
5 clickBehavior: 'sticky',
6  
7 // how much time the hovered dropdown hides after mouseleave
8 hideTimeout: 200

Changelog:

v4.1.1 (2018-09-04)

  • Added support for linked dropdown.

2018-04-10

  • Updated for Bootstrap 4

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

source : jquery.net