refactoring code for attendance button

This commit is contained in:
raluka 2015-07-07 19:10:20 +02:00
parent 522f0b31d9
commit ff6f53aec2
3 changed files with 30 additions and 46 deletions

View file

@ -2,6 +2,8 @@ $(function () {
$("[class='switch-checkbox']").bootstrapSwitch();
$('input[class="switch-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) {
console.log(event);
console.log(state);
var url = $(this).attr('url') + state;
var method = $(this).attr('method');
@ -11,4 +13,7 @@ $(function () {
dataType: 'script'
});
});
});