DefinitelyTyped/bootstrap-switch/bootstrap-switch-tests.ts
johnmbaughman 593e5b9081 Initial upload
Tests pass.
2015-10-26 22:54:20 -06:00

25 lines
507 B
TypeScript

/// <reference path="../jquery/jquery.d.ts"/>
/// <reference path="bootstrap-switch.d.ts" />
function test_cases() {
$('#switch').bootstrapSwitch();
$('#switch').bootstrapSwitch({
state: false
});
$('#switch').bootstrapSwitch({
state: false,
disabled: true
});
//var mySwitch = $('#switch').get(0);
//mySwitch.toggleAnimate();
$('#switch').bootstrapSwitch('state', true, true);
$('#switch').on('switchChange.bootstrapSwitch', (event) => {
console.log($(event.target).val());
});
}