HTML can be inserted into a WTUI template by using the <wtui:html> tag.
jQuery can be used in the JavaScript to respond to events from the HTML controls, but must be put in the WTUI.on('ready') event handler.
<wtui:panel id="panelWithHTML">
<wtui:html>
<table>
<tr>
<td>cell 0</td>
<td>cell 1</td>
</tr>
</table>
<button class="wt-button" id="htmlButton">HTML Button</button>
</wtui:html>
<wtui:button id="okButton">OK</wtui:button>
</wtui:panel>
Javascript:
WTUI.on('ready', function() {
$('#htmlButton').on('click', function() {
alert("The HTML button was clicked");
}
});
WTUI('okButton').on('click', function() {
alert('The WTUI OK button was clicked');
});