Options - daneWilliams/jquery.dropdown GitHub Wiki
Animation
speed
Default value: 300
- Animation speed, in ms.
easing
Default value: easeInOutCirc
- Easing method to use.
- All built-in jQuery methods are supported, as well as those included with jQuery Transit.
Positioning
margin
Default value: 20
- Amount of space between the edge of the dropdown menu and browser window, in px.
collision
Default value: true
- Whether or not to enable collision detection.
- If enabled, the dropdown will reposition based on the amount of available space in the viewport.
autoResize
Default value: 200
- The number of ms to set the resize timer interval to.
- This checks the amount of available space when the window changes size and resizes the dropdown if needed.
- Set 0 to disable automatic resizing.
scrollSelected
Default value: true
- Scroll to first selected item when the dropdown or a menu is opened.
Keyboard navigation
keyboard
Default value: true
- Whether or not to enable keyboard navigation.
- If enabled, the following keys can be used to interact with the dropdown;
Nesting
nested
Default value: true
- Whether or not to enable multi-level nesting.
- If disabled, all items will be displayed in a single menu.
selectParents
Default value: false
- Whether or not to add menu parents as selectable items.
- If disabled and
nested
is also disabled, parent items will be displayed as text labels.
Multi-select
multi
Default value: false
- Whether or not to enable multiple item selection.
- If populating a dropdown from a
select
element, set tonull
to auto-detect based on themultiple
attribute.
minSelect
Default value: false
- Minimum number of selectable items.
maxSelect
Default value: false
- Maximum number of selectable items.
Links
selectLinks
Default value: false
- Whether or not to make links selectable.
followLinks
Default value: true
- Whether or not to follow link URLs.
Close
closeText
Default value: Close
- Text used for the close button.
autoClose
Default value: true
- Whether or not to close automatically when the dropdown loses focus.
autoCloseMax
Default value: true
- Whether or not to close the dropdown when the maximum number of selectable items has been reached.
autoCloseLink
Default value: false
- Whether or not to close the dropdown when a link is clicked.
closeReset
Default value: true
- Whether or not to reset the dropdown when it is closed.
- When resetting, all menus are reverted back to their original positions.
Back
backText
Default value: Back
- Text used for the back button.
Toggle
toggleText
Default value: Please select
- Default text used for the toggle button.
autoToggle
Default value: true
- Whether or not to update the toggle button text with the selected item(s).
autoToggleLink
Default value: false
- Whether or not to update the toggle button text when a link is selected.
- Requires
autoToggle
to be enabled.
autoToggleHTML
Default value: false
- Replace the toggle text with HTML contents of selected item(s)
- Requires
autoToggle
to be enabled.
Title
titleText
Default value: Please select
- Default title text
autoTitle
Default value: true
- Whether or not to update the title text with the menu title.
- The menu title is determined from the parent item.