update design patterns example
This commit is contained in:
parent
b5910f5f62
commit
ff26bb5671
1 changed files with 3 additions and 3 deletions
|
@ -631,12 +631,12 @@ Ox.load(['Image', 'UI'], function() {
|
||||||
})
|
})
|
||||||
.appendTo(Ox.$body);
|
.appendTo(Ox.$body);
|
||||||
/*
|
/*
|
||||||
As a last step, we add a handler to the `invert` event of each widgets. It
|
As a last step, we add another `doubleclick` handler to each widget. It will
|
||||||
will display the widget's name and options inside the first box.
|
display the widget's name and options inside the first box.
|
||||||
*/
|
*/
|
||||||
Ox.forEach(My, function($box, name) {
|
Ox.forEach(My, function($box, name) {
|
||||||
$box.bindEvent({
|
$box.bindEvent({
|
||||||
invert: function() {
|
doubleclick: function() {
|
||||||
My.$box.displayText(
|
My.$box.displayText(
|
||||||
'<b>' + name[1].toUpperCase() + name.slice(2) + '</b><br>'
|
'<b>' + name[1].toUpperCase() + name.slice(2) + '</b><br>'
|
||||||
+ JSON.stringify($box.options()).replace(/([,:])/g, '$1 ')
|
+ JSON.stringify($box.options()).replace(/([,:])/g, '$1 ')
|
||||||
|
|
Loading…
Reference in a new issue