Button

Introduction

A simple HTML button.

Helium View Reference

<button/>

Plain HTML

Output widget
<button id="w1" type="button" class="btn">Button example</button>

JavaScript / jQuery

Output widget - Programmatically
function buttonExampleOnClickCallback() {
    alert('button pushed!');
}
function drawButtonExample(){
    var canvas = $('<div />').addClass('widget-container');
    var button = $('<button />', {
        'id':'w1',
        'text':'Button example'
    })
    .on('click', buttonExampleOnClickCallback)
    .appendTo(canvas);
    
    button.addClass('btn');
    canvas.appendTo($('#embeddedComponentContent'));
}