diff --git a/demos/arrayinput/index.html b/demos/arrayinput/index.html new file mode 100644 index 00000000..caed9eae --- /dev/null +++ b/demos/arrayinput/index.html @@ -0,0 +1,11 @@ + + + + OxJS ArrayInput Demo + + + + + + \ No newline at end of file diff --git a/demos/arrayinput/js/arrayinput.js b/demos/arrayinput/js/arrayinput.js new file mode 100644 index 00000000..e1da3bf9 --- /dev/null +++ b/demos/arrayinput/js/arrayinput.js @@ -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) + +}); \ No newline at end of file