Skip to content

Commit 629e9d7

Browse files
committed
Update radio input manual test
1 parent 59c6583 commit 629e9d7

File tree

1 file changed

+3
-3
lines changed
  • test/manual-test-examples/dom/radio_test

1 file changed

+3
-3
lines changed

test/manual-test-examples/dom/radio_test/sketch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ function setup() {
55
radio.id('test');
66
//radio = createSelect(); // for comparison
77

8-
// just mucking around
8+
// The first is the value; the second is the optional label
99
radio.option('apple', '1');
1010
radio.option('orange', '2');
1111
radio.option('pear');
1212

1313
// Set what it starts as
14-
radio.selected('2');
14+
radio.selected('orange');
1515

1616
radio.changed(mySelectEvent);
1717
}
@@ -24,7 +24,7 @@ function draw() {
2424
}
2525

2626
function mySelectEvent() {
27-
var selected = this.selected();
27+
var selected = this.selected().value;
2828
console.log(this.value());
2929
if (selected === 'pear') {
3030
console.log("it's a pear!");

0 commit comments

Comments
 (0)