Refreshes the object without completely re-inserting it.
refresh([id])

id | string, id of the element

Returns number of milliseconds it took to refresh.

#### Description

This method is common for all w2ui widgets. It has slight differences from widget to widget. In general the render() method is called once during the initial creation and rendering of the object. The refresh() method is called when you need to update content if you have changed object's properties.
$('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel' }, { type: 'preview', size: 200, hidden: true } ] }); // ... // some code // ... w2ui['layout'].refresh(); If no arguments provided, the entire widget will be refreshed. However, for some widget an optional second parameter can be specified to refresh that portion only.
For w2layout it is the panel: w2ui['layout'].refresh('main'); For w2sidebar it is id of the node: w2ui['sidebar'].refresh('node-id'); For w2tabs it is id of the tab: w2ui['tabs'].refresh('tab-id'); For w2toolbar it is id of the toolbar item: w2ui['toolbar'].refresh('toolbar-id');