WRT widgets, unlike websites, can contain a single HTML page. This means that, if you want to
implement different views or screens within a WRT widget, the only way to do it is by manipulating its
DOM structure.
Usually, there are 2 different approaches to this task:
write all your Widget HTML structure statically, hiding and showing elements by using JavaScript
and CSS
·
write only the basic HTML structure statically, and then dynamically build, append and remove
DOM elements by using JavaScript
·
Usually, the 2 approaches are mixed within the same Widget.