A single select drop-down similar to the native select control, but standardized to look the same across browsers.
Call the selectlist control via JavaScript:
{% highlight js %}$('#mySelectlist').selectlist();{% endhighlight %}Add data-initialize="selectlist" to the .selectlist element that you wish to initialize on $.ready(). Any selectlist that is programmatically generated after the initial page load will initialize when the mousedown event is fired on it if it has data-initialize="selectlist".
Wrap class="selectlist" around an input and a button within a class="fuelux" container.
.data-* attributes plus a text property with the visible text from the item..selectBySelector('li:eq({index})')
{% highlight js %}$('#mySelectlist').selectlist('selectByIndex', 1);{% endhighlight %}
data-value attribute value. Convenience method for .selectBySelector('data-value={value}').
{% highlight js %}$('#mySelectlist').selectlist('selectByValue', 'foo');{% endhighlight %}
| Event Type | Description |
|---|---|
| changed.fu.selectlist | This event fires when the value changes by selecting an item from the list. Arguments include event, data where data represents the same object structure returned by the selectedItem method. |
All selectlist events are fired on the .selectlist classed element.
A single select drop-down similar to the native select control. Wrap the input and selectlist button within .fuelux .selectlist