English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
BootStrap implements the mouse hover dropdown list function, the specific content is as follows:
//The simplest mouse hover to implement dropdown functionality, apply knowledge of bootstrap framework, don't know bootstrap, search Baidu on how to use it
<html><head> <meta charset="UTF-8"> <!-- Introduce Bootstrap --> <link href="../css/"bootstrap.min.css" rel="external nofollow" rel="stylesheet"> <!-- jQuery file. Make sure to load the jQuery file before bootstrap.min.js --> <script src="../libs/jquery-1.11.1.js"></script> <script src="../js/bootstrap.min.js"></script> <title></title> </head> <body> <div class="dropdown" > <span class="dropdown-toggle" data-toggle="dropdown" data-target="#" >Trigger</span> <ul class="dropdown-menu" > <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> </div> <script> $("document").ready(function(){ $("span").hover(function(){//Mouse hover trigger event $(".dropdown-toggle").dropdown('toggle'); }); }); </script> </body> </html>
The above is the Bootstrap mouse hover dropdown list function introduced by the editor for everyone. I hope it will be helpful to everyone. If you have any questions, please leave a message, and the editor will reply to everyone in time. I also want to express my sincere gratitude to everyone for their support of the Yelling tutorial website!
Declaration: The content of this article is from the Internet, and the copyright belongs to the original author. The content is contributed and uploaded by Internet users spontaneously. This website does not own the copyright, does not edit the content manually, and does not assume relevant legal liability. If you find any content suspected of copyright infringement, please send an email to notice#w3Please send an email to codebox.com (replace # with @ when sending an email) to report violations, and provide relevant evidence. Once verified, this site will immediately delete the infringing content.