Back To School, In Order To College Sports
Need And Significance Of Soccer Jerseys
boston red sox jerseys
Where Uncover Discount Sports Gear
Some Features That Is That Possible Not Know For Soccer Jerseys
The Craze For Man Utd Football Shirts
Why Require Collect Hockey Jerseys
vancouver canucks jersey authentic
The Best Cheap Jerseys,Mlb Jerseys
Jay Cutler Saga Highlights Lack Of Loyalty In Nfl

Bootstrap Dropdown Plugin

In this tutorial we will cover Interactive part of Bootstrap Dropdown Plugin. We can use dropdown menu with any component using Bootstrap Dropdown plugin, including the navbar, tabs, and pills.

If you want to implement functionality of this plugin individually, simple include the dropdown.js file along the other JS files. Else as we have discussed in the tutorial of Bootstrap Plugin Overview, you can include bootstrap.js or the minified bootstrap.min.js.

Usage

Via data attribute of JavaScript you can toggle the dropdown plugin’s hidden content below is the details of both methods.

Via data attributes

Add data-toggle=”dropdown” to a link or button to toggle a dropdown as shown below:

If you want to keep URLs intact, use the data-target attribute instead of href="#". This is useful if the browser is not enabling JavaScript.

Via JavaScript

Using following method call the dropdowns via JavaScript.

Examples of Dropdown Plugins

Within Navbar

See this example of dropdown menu within a navbar:

Within Tabs

See this example of dropdown menu within tabs:

Options

There are no any options of Bootstrap Dropdown Plugin.

Methods

The dropdown toggle has a simple method to show or hide the dropdown.

Example

See this example of dropdown plugin method.

Events

All dropdown events are fired at the .dropdown-menu’s parent element.

Event Type Description
show.bs.dropdown This event fires immediately when the show instance method is called. The toggling anchor element is available as the relatedTarget property of the event.
shown.bs.dropdown This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.
hide.bs.dropdown This event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the relatedTarget property of the event.
hidden.bs.dropdown This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the relatedTarget property of the event.

Leave a Reply

Your email address will not be published. Required fields are marked *