Provides support for placing form-elements in Bootstrap dropdowns
- prevents bootstrap dropdown from hiding when clicking inside
- automatically focus the first visible form element when the dropdown is shows up
- close dropdown on blur when the new active element is not in dropdown content
Javascript initialization
$('.dropdown-control').dropdownControl({
showOnFocus: true,
focusInput: true
})
Markup
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle dropdown-control">
Filters <span class="caret"></span>
</button>
<div class="dropdown-menu" role="menu">
<div class="form-group">
<input type="text" class="form-control">
</div>
</div>
</div>
Name | Description | Default |
---|---|---|
focusInput | automatic focus first element | false |
showOnFocus | automatically opens the dropdown on focus | false |
http://rawgithub.com/benignware/bootstrap-dropdown-control/master/examples/index.html