Destroys the object.
destroy()
Returns undefined.

#### Description

The destroy() method will remove the object from the screen (if it is rendered), remove it from w2ui object array and destroy all related objects. For example, if it is a grid, it will destroy grid's toolbar. This method emits .onDestroy event.
$('#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'].destroy(); You can also use w2destroy() method defined in utilities. $().w2destroy('layout');