Flagrate API documentation

Home ▲
class

flagrate.Switch

Example

var sw = flagrate.createSwitch().insertTo(x);

sw.on('on', function () {
  console.log('on');
});
sw.on('off', function () {
  console.log('off');
});
sw.on('change', function (e) {
  console.log(e.target.isOn());
});

Structure

<button class="flagrate flagrate-button flagrate-switch"></button>

Events

Inheritances


Constructor