Ox.load({UI: {debug: true}, Geo: {}}, function() { var $treeList = new Ox.TreeList({ data: {'Ox.COUNTRIES': Ox.COUNTRIES}, width: 256 - Ox.UI.SCROLLBAR_SIZE }) .bindEvent({ resize: function(data) { $treeList.options({width: data.width - Ox.UI.SCROLLBAR_SIZE}); } }), $debug = new Ox.Element('div'), $button = new Ox.Button({ title: 'Debug' }) .bindEvent({ click: function() { $text.html(JSON.stringify($treeList.$element.options('items'))) } }) .appendTo($debug), $text = new Ox.Element('div').appendTo($debug), $splitPanel = new Ox.SplitPanel({ elements: [ { element: $treeList, size: 256, resizable: true, resize: [128, 256, 384] }, { element: $debug } ], orientation: 'horizontal' }).appendTo($('body')); });