w2layout.content

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 define content for this panel, it will be set within style tag. You can also load content for the css panel w2layout.load method. or The content argument can be either an HTML or an object. If it is an object, then it will assign layout panel's div to the .box property of the object and call .render() method. This allows you to make a grid, sidebar, or any other object with .box property and .render() method as content for the panel. 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:

User Comments

comments powered by Disqus