Αποτελέσματα Αναζήτησης
Example Explained. The .dropdown class indicates a dropdown menu. To open the dropdown menu, use a button or a link with a class of .dropdown-toggle and the data-toggle="dropdown" attribute. The .caret class creates a caret arrow icon (), which indicates that the button is a dropdown.
Add an extra level of dropdown menus, appearing on hover like those of OS X, with some simple markup additions. Add .dropdown-submenu to any li in an existing dropdown menu for automatic styling.
Bootstrap’s dropdowns, on the other hand, are designed to be generic and applicable to a variety of situations and markup structures. For instance, it is possible to create dropdowns that contain additional inputs and form controls, such as search fields or login forms.
$('.dropdown').on( 'click', '.dropdown-menu li a', function() { var target = $(this).html(); //Adds active class to selected item $(this).parents('.dropdown-menu').find('li').removeClass('active'); $(this).parent('li').addClass('active'); //Displays selected text on dropdown-toggle button $(this).parents('.dropdown').find('.dropdown-toggle ...
6 Μαρ 2021 · 37 Bootstrap Dropdowns. Collection of free custom responsive Bootstrap dropdown menu code examples. Update of September 2020 collection. 15 new items.
Bootstrap provides three types of form layouts: Vertical form (this is default) Horizontal form. Inline form. Standard rules for all three form layouts: Wrap labels and form controls in <div class="form-group"> (needed for optimum spacing) Add class .form-control to all textual <input>, <textarea>, and <select> elements.
Here are the key steps for creating a Bootstrap dropdown: Wrap the dropdown trigger element within an element with Bootstrap's .dropdown class, or another element that uses position: relative; Add Bootstrap's .dropdown-toggle class and add data-toggle="dropdown" to the trigger element (i.e. the element that users click on to expand the dropdown).