This repository was archived by the owner on Jun 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Radiobox
Steve Ruiz edited this page Feb 3, 2018
·
2 revisions
A Radiobox is part of a group of radioboxes, only one of which may be checked at any given time. A Radiobox must be given an array as its group property.
radioboxes = []
for i in [0...3]
new Radiobox
group: radioboxes
#checked: false
An array that the Radiobox will belong to. The array will be given a property, active
, that will hold the index of the checked Radiobox.
radioboxes = []
for i in [0...3]
myRadiobox = new Radiobox
group: radioboxes
Whether the Radiobox is checked. When a Radiobox is checked, all other Radiobox instances in its group array will be unchecked.
checkboxes = []
for i in [0...3]
myRadiobox = new Radiobox
group: checkboxes
checked: true
myRadiobox.checked = false
myRadiobox.on "change:checked", (checked) ->
print 'Is radiobox checked? ' + checked