update design patterns example

This commit is contained in:
rolux 2012-06-30 11:25:15 +02:00
parent b5910f5f62
commit ff26bb5671

View file

@ -631,12 +631,12 @@ Ox.load(['Image', 'UI'], function() {
})
.appendTo(Ox.$body);
/*
As a last step, we add a handler to the `invert` event of each widgets. It
will display the widget's name and options inside the first box.
As a last step, we add another `doubleclick` handler to each widget. It will
display the widget's name and options inside the first box.
*/
Ox.forEach(My, function($box, name) {
$box.bindEvent({
invert: function() {
doubleclick: function() {
My.$box.displayText(
'<b>' + name[1].toUpperCase() + name.slice(2) + '</b><br>'
+ JSON.stringify($box.options()).replace(/([,:])/g, '$1 ')