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="checkmarks"></select>
<select|list multiple="checkmarks"></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); }
behavior:select-checkmarks toggles :checked state of the option when user clicks on checkmark icon (foreground-image) of option element.
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-checkmarks generates:
N/A - behavior:select-checkmarks does not introduce any specific methods.
array of values, read/write, list of checked 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 ...;