Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
(w3847298) add hbs driven checkbox to index page with validation stat…
Browse files Browse the repository at this point in the history
…e of error for testing
  • Loading branch information
Christopher McCulloh committed Apr 24, 2017
1 parent a5ad40f commit 374faed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<h2>Checkboxes</h2>
<div class="thin-box">
<section id="checkboxes-block">

<div id="myCheckbox1Wrapper" style="width: 300px;"></div>
<div class="checkbox" id="myCheckbox">
<label class="checkbox-custom" data-initialize="checkbox" id="myCustomCheckbox1">
<input class="sr-only" type="checkbox" value="" />
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ define(function (require) {
CHECKBOX
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

var checkbox = require('hbs!fuelux_templates/checkbox');
var $myCheckbox1Wrapper = $('#myCheckbox1Wrapper');
$myCheckbox1Wrapper.html(checkbox({ id: 'myCheckbox1', required: true, validation: 'error', label: 'Checkboxes', checkboxes: [{label: 'Checkbox Label 1' }, {label: 'Checkbox Label 2' }]}));

// sample method buttons
$('#btnCheckboxToggle').on('click', function () {
$('#myCustomCheckbox1').checkbox('toggle');
Expand Down

0 comments on commit 374faed

Please sign in to comment.