add ArrayInput demo

This commit is contained in:
rolux 2011-11-30 15:32:12 +01:00
parent 7633de3958
commit a6d4734bb3
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>OxJS ArrayInput Demo</title
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../dev/Ox.js"></script>
<script type="text/javascript" src="js/arrayinput.js"></script>
</head>
<body>
</body>
</html>

View file

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