Loads content and renders it inside the panel.
load(type, url, [transition], [onLoad])

type | string, name of the panel
url | string, server url to load content from
transition | string, name of the transition (optional)
onLoad | function, JavaScript call back function (optional)

#### Description

This method loads content for the panel from the url. The content should be Text or HTML and should not include JavaScript. The first argument type is the name of the panel. It can be one of the following:

- top
- left
- main
- right
- preview
- bottom

The second argument url is the location to load content from. You can optionally provide transition that defines visual transition to the new content. The transition is done using w2utils.transition() method and it can be one of the following:

- slide-left
- slide-right
- slide-up
- slide-down
- flip-left
- flip-right
- flip-up
- flip-down
- pop-in
- pop-out

Below is an example how to set content to the layout panel: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel' }, { type: 'preview', size: 200 } ] }); // return current content w2ui['layout'].load('main', 'http://domain.com/path/to/file', 'slide-left', function () { console.log('content loaded'); }); If you want to execute some JavaScript code after content was loaded and displayed, you can provide onLoad argument which is a JavaScript function.