refactoring code for attendance button
This commit is contained in:
parent
522f0b31d9
commit
ff6f53aec2
3 changed files with 30 additions and 46 deletions
|
|
@ -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'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue