oxjs/demos/arrayinput/js/arrayinput.js
2011-12-21 21:03:52 +05:30

33 lines
No EOL
728 B
JavaScript

Ox.load('UI', function() {
var $arrayInput = Ox.ArrayInput({
label: 'ArrayInput',
max: 3,
value: ['foo', 'bar']
})
.css({margin: '16px'})
.appendTo(Ox.$body);
Ox.Button({
title: 'Value'
})
.css({marginLeft: '16px'})
.bindEvent({
click: function() {
Ox.print($arrayInput.options('value'));
}
})
.appendTo(Ox.$body)
Ox.Button({
title: 'Reset'
})
.css({marginLeft: '16px'})
.bindEvent({
click: function() {
$arrayInput.value(['foo', 'bar']);
}
})
.appendTo(Ox.$body)
});