EXAMPLE: Swap VIEW SOURCE

In this example, an instance of the Uize.Widget.Swap.Html class is wired up to a div in the document in order to provide a transition effect when swapping out the HTML. Making the widget display new HTML with an accompanying transition effect is as simple as setting the widget's content set-get property. You can set the content set-get property to any HTML, including HTML containing images and complex layouts, although in this case the HTML is merely styles div tags. Use the buttons below to switch back and forth between different content.

Content 1 Content 2