From a6d4734bb3c37e1e225e534c5a3808937c44c927 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 30 Nov 2011 15:32:12 +0100 Subject: [PATCH] add ArrayInput demo --- demos/arrayinput/index.html | 11 +++++++++++ demos/arrayinput/js/arrayinput.js | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 demos/arrayinput/index.html create mode 100644 demos/arrayinput/js/arrayinput.js 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