Toggles the panel.
toggle(type, [immediate])

type | string, name of the panel
immediate | boolean, without animation (optional)

#### Description

If the panel is hidden the toggle() method will call w2layout.show() method, if hidden - w2layout.hide(). Below is an example how to toggle a panel: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel' }, { type: 'preview', size: 200 } ] }); // with animation w2ui['layout'].toggle('preview'); // without animation w2ui['layout'].toggle('preview', true);