Behavior of <select multiple> lists. In principle it can be applied to any DOM element.
These elements have behavior:select applied by default:
<select size="2...N" multiple></select><select|list multiple></select>Same as behavior:select.
Selected options are getting :checked state flag set therefore custom styling of selected state can be made using :checked pseudo-class in CSS:
select > option:checked { background-image: url(my-checkmark.png); }
This behavior knows about:
size=integer - number of visible elements in the list. Note: height of the select element can be overriden by CSS.name="name" - standard attribute name - name of the input element on a form.novalue="text" - if select has no <option selected> initially it will have this text rendered.Other than standard set of events (mouse, keyboard, focus) behavior:select-multiple generates:
N/A - behavior:select-multiple does not introduce any specific methods.
array of values, read/write, list of selected options.
onValueChanged handlervar btn = $(select#some);
btn.onValueChanged = function() { var v = this.value; ... }
on() subscriptionvar btn = $(select#some);
btn.on("change", function() { ... event handling code ... });
self.on("change", "select#some", function() { ... event handling code ... });
include "decorators.tis"; @change @on "select#some" :: ... event handling code ...;