oxjs/demos/arrayinput/js/arrayinput.js

35 lines
777 B
JavaScript
Raw Normal View History

2011-11-30 14:32:12 +00:00
Ox.load('UI', function() {
var $arrayInput = Ox.ArrayInput({
label: 'ArrayInput',
max: 3,
value: ['foo', 'bar']
})
.css({margin: '16px'})
.appendTo(Ox.$body);
2011-12-21 13:42:47 +00:00
Ox.Button({
title: 'Value'
})
.css({marginLeft: '16px'})
.bindEvent({
click: function() {
Ox.print($arrayInput.options('value'));
}
})
.appendTo(Ox.$body)
2011-11-30 14:32:12 +00:00
Ox.Button({
title: 'Reset'
})
.css({marginLeft: '16px'})
.bindEvent({
click: function() {
$arrayInput.options({
value: ['foo', 'bar']
});
}
})
.appendTo(Ox.$body)
});