4

I'm trying to do checkbox in Semantic UI, but it doesn't work and I can't figure out what I'm doing wrong. I'm including jquery, semantic.min.js, checkbox.js and semantic.min.css, then I add this code:

$('.ui.checkbox')
    .checkbox()
;

There is console output, but image of checkbox doesn't change.

3 Answers 3

8

I've solved this problem to write jQuery's code like this:

$(document).ready(
        function () {
            $('.ui.checkbox')
                    .checkbox()
                    ;
        });
2

Did you wrap it on proper Div tags?

<div class="ui checkbox">
  <input type="checkbox" name="fun">
  <label>I enjoy having fun</label>
</div>
1

you have to mask the original checkbox like this

<div class="ui checkbox">
  <input name="subscribe" type="checkbox">
  <label>Subscribe to Email News letters</label>
</div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.