We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59c6583 commit 629e9d7Copy full SHA for 629e9d7
test/manual-test-examples/dom/radio_test/sketch.js
@@ -5,13 +5,13 @@ function setup() {
5
radio.id('test');
6
//radio = createSelect(); // for comparison
7
8
- // just mucking around
+ // The first is the value; the second is the optional label
9
radio.option('apple', '1');
10
radio.option('orange', '2');
11
radio.option('pear');
12
13
// Set what it starts as
14
- radio.selected('2');
+ radio.selected('orange');
15
16
radio.changed(mySelectEvent);
17
}
@@ -24,7 +24,7 @@ function draw() {
24
25
26
function mySelectEvent() {
27
- var selected = this.selected();
+ var selected = this.selected().value;
28
console.log(this.value());
29
if (selected === 'pear') {
30
console.log("it's a pear!");
0 commit comments