12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Blasting off with Bootstrap</title>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-COMPATIBLE" content="IE=Edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" href="../css/bootstrap.min.css"/>
- <!--[if lt IE 9]>
- <script src="../js/html5shiv.3-7-0.js"></script>
- <script src="../js/respond.1-4-2.min.js"></script>
- <![endif]-->
- </head>
- <body>
- <div class="container">
- <div class="panel">
- <div class="dropdown" id="myDropdown">
- <!-- right-clicking this link to open in a new tab will take you to the href -->
- <a class="myDropdownHandle" href="http://google.fr"
- data-toggle="dropdown" data-target="#">
- Dropdown<span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- <li><a href="#">Item 1</a></li>
- <li><a href="#">Item 2</a></li>
- <li><a href="#">Item 3</a></li>
- <li><a href="#">Item 4</a></li>
- </ul>
- </div>
- </div>
- <!-- https://ajax.googleapis.com/ajax/libs/jquery/1.11.1.jquery.min.js -->
- <script src="../js/jquery-1.11.2.min.js"></script>
- <script src="../js/bootstrap.js"></script>
- <script type="text/javascript">
- $(document).ready(function () {
- $('#myDropdown .myDropdownHandle').dropdown('toggle');
- });
- $('#myDropdown').on('show.bs.dropdown', function () {
- console.log('Opening dropdown');
- });
- $('#myDropdown').on('shown.bs.dropdown', function () {
- console.log('Dropdown Opened');
- });
- $('#myDropdown').on('hide.bs.dropdown', function () {
- console.log('Hiding dropdown');
- });
- $('#myDropdown').on('hidden.bs.dropdown', function () {
- console.log('Dropdown hidden');
- });
- </script>
- </div>
- </body>
- </html>
|