How does one dynamically enable and disable the button when the checkbox is checked and unchecked in semantic UI, I've spent so much time to do this.
Here is the html
<div class="ui fitted checkbox">
<input type="checkbox" > <label></label>
</div>
<div class="ui small positive disabled button" id="edit">
<i class="edit icon"></i> Edit
</div>
Here is my javascript
<script>
$(document).ready(function () {
if (
$('#cek').checkbox({
onChecked: function () {
}
})) {
$('#edit').removeClass('disabled');
} else {
$('#edit').addClass('disabled');
}
});
</script>
Please help, it drives me crazy.