add ArrayInput demo
This commit is contained in:
parent
7633de3958
commit
a6d4734bb3
2 changed files with 35 additions and 0 deletions
11
demos/arrayinput/index.html
Normal file
11
demos/arrayinput/index.html
Normal 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>
|
24
demos/arrayinput/js/arrayinput.js
Normal file
24
demos/arrayinput/js/arrayinput.js
Normal 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)
|
||||
|
||||
});
|
Loading…
Reference in a new issue