Sets or retrieves panel content.
content(type, [content], [transition])
type |
string, name of the panel |
content |
string or object, new content for the panel (optional) |
transition |
string, name of the transition (optional) |
Description
The first argument type is the name of the panel. It can be one of the following:
- top
- left
- main
- right
- preview
- bottom
- css
As of 1.3 there is a hidden panel named css. If you set content to this panel, it will be set withing style tag:
It can be used when setting content for the css panel with content
method or you can also load content with w2layout.load method.
or
The content argument can be either an HTML string or an object with
.render(box) method. If the argument content is not specified the method will
return current content of the panel.
You can optionally provide transition argument 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
You can set content during object creation:
Or anytime during run-time: