Wijmo UI for the Web
CheckBox Markup and Scripting
Wijmo User Guide > Widgets > CheckBox > CheckBox Markup and Scripting

The HTML markup for a wijcheckbox widget can be done in three different ways, like this.

Markup
Copy Code
<p>Plain checkbox:</p>
<input type='checkbox'></br>
<p>Checkbox and label:</p>
<input type='checkbox' id='checkbox1' />Label text<label for='checkbox1'></label></br>
<p>Label containing a checkbox:</p>
<label><input type='checkbox' />Label text</label>

You can initialize the widget with the following jQuery script.

Script
Copy Code
<script type="text/javascript">
    requirejs.config({
        baseUrl: "http://cdn.wijmo.com/amd-js/3.20161.90",
            paths: {
                "jquery": "jquery-1.11.1.min",
                "jquery-ui": "jquery-ui-1.11.0.custom.min",
                "jquery.ui": "jquery-ui",
                "jquery.mousewheel": "jquery.mousewheel.min",
                "globalize": "globalize.min"
            }
    });
</script>

<script id="scriptInit" type="text/javascript">
    require(["wijmo.wijcheckbox"], function () {
        $(document).ready(function () {
            $(":input[type='checkbox']").wijcheckbox();
        });
    });
</script>

The markup and script featured here results in the following live widgets.

The markup used to create a wijcheckbox widget can be done in three different ways.

See Also

KO

Reference