Called when object is refreshed.
onRefresh = function(event)
This event is common for all w2ui widgets (layout, grid, toolbar, sidebar, tabs, form).
You can add event listener during the object creation: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'preview', size: 200 } ], onRefresh: function(event) { console.log('object '+ event.target + ' is refreshed'); } }); or after the object has been created: w2ui.layout.on('refresh', function(event) { console.log('object '+ event.target + ' is refreshed'); }); The event handler is called before the default action of the event is triggered. You can cancel the default action by calling event.preventDefault(). To perform an action after the event is fully processed, define event.onComplete function.
See events page in utilities for more details.

#### Adding Custom Events for Generated Content

Normally, you should not add any events directly to generated content (grid, sidebar, etc), however, it is possible to do this. You can either user inline html event <... onclick="..."> or you can add them with jQuery. You will need to add them in event.onComplete loop. w2ui.layout.on('refresh', function(event) { event.onComplete = function () { $(this.box).find('#..').on('click', function () { // do my staff }); } });

#### Layout, Sidebar, Toolbar, Tabs

For layout, sidebar, toolbar and tabs the refresh event will be triggered for each refreshed panel (node, item, tab). It differs from other widgets, but it seems to be necessary because for layout, sidebar, toolbar and tabs the refresh method takes an argument that specifies which panel, node, item or tab to refresh.