A simple and lighweight jQuery plugin for creating dropdown menus.
Include script after the jQuery library:
<script type="text/javascript" src="/path/to/jquery-dropdown.js"></script>
$('.dropdown').dropdown( options )
Display the dropdown menu on click
or hover
.
toggleOn: 'click'
Close dropdown menu when click outsite the element.
closeOnBlur: true
Set the class that will be added to the element when expanded.
expandedClass: 'expanded'
Selector of the element used as the label on the dropdown.
elementLabel: '.sdui-dropdown-label'
Selector of the element used as the content on the dropdown.
elementContent: '.sdui-dropdown-content'
Use a jQuery UI animation to display the content element. Requires: jQuery UI.
showAnim: ''
- First load of showAnim is not working properly
- Change position of element if is on the edge of the page
- Handle which should be in front
- Close open elements inside a group items when closeOnBlur: false
MIT License (c) Bruno Tarmann