Skip to content

Commit

Permalink
fixed add class when input trigger change
Browse files Browse the repository at this point in the history
  • Loading branch information
bigbearman committed Oct 28, 2021
1 parent dcec279 commit a2edc95
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/plg_system_t3/base-bs3/js/frontend-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@

input.prop('checked', true).trigger('change');
}
if (input.val() == '') {
label.addClass('active btn-primary');
} else if (input.val() == 0) {
label.addClass('active btn-danger');
} else {
label.addClass('active btn-success');
}
});

$(".btn-group input[checked=checked]").each(function()
Expand Down

0 comments on commit a2edc95

Please sign in to comment.