-
Notifications
You must be signed in to change notification settings - Fork 9
Docs
Lorenzo Stanco edited this page Jul 29, 2014
·
5 revisions
For an usage example see HowTo or a complete Demo.
- Options
- Events
var myFancySelect = new FancySelect(element, options);
$(element).fancySelect(options); // Equivalent example
-
element
: A<select>
DOM element or ID. -
options
: (object) Options for the class. They are all listed below.-
showText
: IfTRUE
(default) keeps text in the dropdown menu. -
showImages
: IfTRUE
(default) show images in the dropdown menu. -
className
: A class name for CSS styling, default'fancy-select'
. -
autoHide
: IfTRUE
auto-hide the dropdown menu when user clicks outside. -
autoScrollWindow
: IfTRUE
auto-scroll browser window when FancySelect is out of viewport. -
animateFade
: IfTRUE
(default) animate the dropdown menu appearance. -
legacyEvents
: IfTRUE
fires “change” event for the original<select>
element. -
relativeTo
: An element id or element reference for dropdown positioning, defaultdocument.body
. -
fx
: An object for additionalFx
options (default{'duration': 'short'}
).
-
-
show
: The dropdown menu appears. -
hide
: The dropdown menu disappears. -
attach
: FancySelect just replaced the<select>
DOM element. -
detach
: The<select>
DOM element is back.
-
attach()
: Replace the<select>
DOM element with FancySelect. -
detach()
: Bring the<select>
DOM element back. -
select(value)
: Select a value. -
show()
: Show the dropdown menu. -
hide()
: Hide the dropdown menu. -
toggle()
: Show/hide the dropdown menu.
-
fancySelect(options)
: Creates a new instance of FancySelect on elements.
-
fancySelect(options)
: Creates a new instance of FancySelect on the element. -
fancySelectShow()
: Show the FancySelect dropdown on the element. -
fancySelectHide()
: Hide the FancySelect dropdown on the element. -
fancySelectToggle()
: Toggles the FancySelect dropdown on the element.
-
fancySelect
: Retrieves the FancySelect instance of the element.
var myFancySelect = $('mySelect').get('fancySelect'); // Get instance