Semantic-UI
Semantic-UI copied to clipboard
how to dynamically enabled and disabled button when checkbox is checked and unchecked
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,still dont work,thats make me crazy
http://jsfiddle.net/avaqh7af/