https://github.com/tarmann/jquery-dropdown
Simple jQuery Dropdown Plugin
https://github.com/tarmann/jquery-dropdown
Last synced: 4 months ago
JSON representation
Simple jQuery Dropdown Plugin
- Host: GitHub
- URL: https://github.com/tarmann/jquery-dropdown
- Owner: tarmann
- Created: 2013-09-18T11:12:38.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-18T14:29:48.000Z (over 12 years ago)
- Last Synced: 2023-03-12T03:01:59.237Z (over 3 years ago)
- Size: 109 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jQuery Dropdown Plugin
A simple and lighweight jQuery plugin for creating dropdown menus.
### Installation
Include script after the jQuery library:
```html
```
### Usage
```js
$('.dropdown').dropdown( options )
```
### Options
#### toggleOn (string)
Display the dropdown menu on `click` or `hover`.
```js
toggleOn: 'click'
```
#### closeOnBlur (boolean)
Close dropdown menu when click outsite the element.
```js
closeOnBlur: true
```
#### expandedClass (string)
Set the class that will be added to the element when expanded.
```js
expandedClass: 'expanded'
```
#### elementLabelClass (string)
Selector of the element used as the label on the dropdown.
```js
elementLabel: '.sdui-dropdown-label'
```
#### elementContent (string)
Selector of the element used as the content on the dropdown.
```js
elementContent: '.sdui-dropdown-content'
```
#### showAnim (string)
Use a jQuery UI animation to display the content element. Requires: jQuery UI.
```js
showAnim: ''
```
### TODO
* 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
## License
MIT License
(c) [Bruno Tarmann](http://tarmann.com.br)