09:41 7/6/26 JavaScript Picker
menu
Documentation keyboard_arrow_right Picker
JavaScript Picker
The [Link] is a responsive JavaScript plugin designed for easy option selection
within web applications. Key features include its adaptability to different screen sizes, a user-
friendly interface, customization capabilities, lightweight design for fast performance, and
broad compatibility across browsers and devices.
Documentation
Methods
Method Description
Return the option at the specified position
getLabel(int);
@param - element index
open(); Open the picker
close(); Closes the picker
getValue(); Returns the index corresponding to the current selected element
setValue(int); Define the option at the specified position as the picker value
Events
The order of the onchange methods has changed from 4.2.0
[Link] 1/3
09:41 7/6/26 JavaScript Picker
Method Description
When the value is changed
onchange onchange(DOMElement element, Object instance, String value, String value,
Number selectIndex) => void
When the picker is closed
onclose
onclose(DOMElement element, Object instance) => void
When the picker is open
onopen
onopen(DOMElement element, Object instance) => void
Initialization options
Property Description
data: string[] The picker options.
value: int The position of the initial picker option.
content: string The html or material-design icon that should be in front of the picker.
width: number The picker width.
How each option should be shown.
render: function
function(string option) => string
Examples
Load picker basic example
[Link] 2/3
09:41 7/6/26 JavaScript Picker
<html>
<script src="[Link]
<link rel="stylesheet" href="[Link]
type="text/css" />
<div class='row'>
<div class='column p10'>
<div id='picker'></div>
</div>
</div>
<script>
[Link]([Link]('picker'), {
data: ['Option1', 'Option2', 'Option3'],
value: 3,
})
</script>
</html>
Related Tools
JavaScript Dropdown - Full dropdown component with autocomplete and search
[Link] 3/3