Semantic-UI icon indicating copy to clipboard operation
Semantic-UI copied to clipboard

how to dynamically enabled and disabled button when checkbox is checked and unchecked

Open audio99 opened this issue 11 years ago • 1 comments

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

audio99 avatar May 29 '15 11:05 audio99

http://jsfiddle.net/avaqh7af/

jlukic avatar May 29 '15 14:05 jlukic