4 <title>Checkboxes and radio buttons customization (jQuery and Zepto) plugin</title>
6 <meta content="width=device-width" name="viewport">
7 <link href="./css/custom.css?v=1.0.2" rel="stylesheet">
8 <link href="../skins/all.css?v=1.0.2" rel="stylesheet">
9 <script src="./js/jquery.js"></script>
10 <script src="../icheck.js?v=1.0.2"></script>
11 <script src="./js/custom.min.js?v=1.0.2"></script>
14 <div class="layout clear">
16 <h1>super customized checkboxes and radio buttons for jQuery & Zepto</h1>
17 <h3>iCheck <span>v1.0.2</span></h3>
18 <strong>@<a href="http://twitter.com/fronteed/">Fronteed</a></strong>
20 <div class="features">
22 <div class="bottom" data-to="demo"></div>
24 <h2>Plugin features</h2>
27 <strong>Identical inputs across different browsers and devices</strong> — both <span class="self" data-to="download">desktop and mobile</span>
30 <strong>Touch devices support</strong> — iOS, Android, BlackBerry, Windows Phone, Amazon Kindle
33 <strong>Keyboard accessible inputs</strong> — <span class="mark">Tab</span>, <span class="mark">Spacebar</span>, <span class="mark">Arrow up/down</span> and other shortcuts
36 <strong>Screenreader accessible inputs</strong> — <a href="https://developer.mozilla.org/en-US/docs/Accessibility/ARIA" target="blank">ARIA</a> attributes for VoiceOver and others
39 <strong>Customization freedom</strong> — use any HTML and CSS to style inputs (try <span class="self" data-to="skins">6 Retina-ready skins</span>)
42 <strong>jQuery and Zepto</strong> JavaScript libraries support from single file
45 <strong>Lightweight size</strong> — 1 kb gzipped
48 <strong class="self" data-to="options">32 options</strong> to customize checkboxes and radio buttons
51 <strong class="self" data-to="callbacks">11 callbacks</strong> to handle changes
54 <strong class="self" data-to="methods">9 methods</strong> to make changes programmatically
57 Saves changes to original inputs, <span class="self" data-to="init">works carefully</span> with any selectors
61 <div class="social clear">
64 <a href="http://github.com/fronteed/iCheck/">Download latest version</a>
67 <ul class="right local">
69 <a href="http://twitter.com/fronteed/">Follow @fronteed</a>
72 <a href="https://twitter.com/intent/tweet?text=Highly customizable checkboxes and radio buttons&url=http://fronteed.com/iCheck/&via=fronteed&hashtags=jQuery,Zepto">Share on Twitter</a>
75 <a href="https://github.com/fronteed/iCheck">Star on GitHub</a>
79 <div class="demo-holder">
80 <h2 class="demo-title">Demo</h2>
83 <div class="top" data-to="features"></div>
84 <div class="bottom" data-to="skins"></div>
86 <div class="demo-list clear">
89 <input tabindex="1" type="checkbox" id="input-1">
90 <label for="input-1">Checkbox, <span>#input-1</span></label>
93 <input tabindex="2" type="checkbox" id="input-2" checked>
94 <label for="input-2">Checkbox, <span>#input-2</span></label>
99 <input tabindex="3" type="radio" id="input-3" name="demo-radio">
100 <label for="input-3">Radio button, <span>#input-3</span></label>
103 <input tabindex="4" type="radio" id="input-4" name="demo-radio" checked>
104 <label for="input-4">Radio button, <span>#input-4</span></label>
108 $(document).ready(function(){
109 var callbacks_list = $('.demo-callbacks ul');
110 $('.demo-list input').on('ifCreated ifClicked ifChanged ifChecked ifUnchecked ifDisabled ifEnabled ifDestroyed', function(event){
111 callbacks_list.prepend('<li><span>#' + this.id + '</span> is ' + event.type.replace('if', '').toLowerCase() + '</li>');
113 checkboxClass: 'icheckbox_square-blue',
114 radioClass: 'iradio_square-blue',
120 <dl class="demo-methods">
122 <span class="self do-check">Add <span class="mark">checked</span> state to 1 and 3 inputs</span>
124 <span class="self">show code</span>
129 $('#input-1, #input-3').iCheck('check');
133 <span class="self do-uncheck">Remove <span class="mark">checked</span> state from 1 and 3 inputs</span>
135 <span class="self">show code</span>
140 $('#input-1, #input-3').iCheck('uncheck');
144 <span class="self do-disable">Add <span class="mark">disabled</span> state to 2 and 4 inputs</span>
146 <span class="self">show code</span>
151 $('#input-2, #input-4').iCheck('disable');
155 <span class="self do-enable">Remove <span class="mark">disabled</span> state from 2 and 4 inputs</span>
157 <span class="self">show code</span>
162 $('#input-2, #input-4').iCheck('enable');
166 <span class="self do-destroy">Remove all traces of iCheck</span>
168 <span class="self">show code</span>
173 $('input').iCheck('destroy');
177 <div class="demo-callbacks">
185 <div class="skin skin-minimal">
187 <div class="top" data-to="demo"></div>
188 <div class="bottom" data-to="skin-square"></div>
190 <h3>Minimal skin</h3>
192 <dd class="selected">
193 <div class="skin-section">
197 <input tabindex="5" type="checkbox" id="minimal-checkbox-1">
198 <label for="minimal-checkbox-1">Checkbox 1</label>
201 <input tabindex="6" type="checkbox" id="minimal-checkbox-2" checked>
202 <label for="minimal-checkbox-2">Checkbox 2</label>
205 <input type="checkbox" id="minimal-checkbox-disabled" disabled>
206 <label for="minimal-checkbox-disabled">Disabled</label>
209 <input type="checkbox" id="minimal-checkbox-disabled-checked" checked disabled>
210 <label for="minimal-checkbox-disabled-checked">Disabled & checked</label>
215 <input tabindex="7" type="radio" id="minimal-radio-1" name="minimal-radio">
216 <label for="minimal-radio-1">Radio button 1</label>
219 <input tabindex="8" type="radio" id="minimal-radio-2" name="minimal-radio" checked>
220 <label for="minimal-radio-2">Radio button 2</label>
223 <input type="radio" id="minimal-radio-disabled" disabled>
224 <label for="minimal-radio-disabled">Disabled</label>
227 <input type="radio" id="minimal-radio-disabled-checked" checked disabled>
228 <label for="minimal-radio-disabled-checked">Disabled & checked</label>
231 <div class="colors clear">
232 <strong>Color schemes</strong>
234 <li class="active" title="Black"></li>
235 <li class="red" title="Red"></li>
236 <li class="green" title="Green"></li>
237 <li class="blue" title="Blue"></li>
238 <li class="aero" title="Aero"></li>
239 <li class="grey" title="Grey"></li>
240 <li class="orange" title="Orange"></li>
241 <li class="yellow" title="Yellow"></li>
242 <li class="pink" title="Pink"></li>
243 <li class="purple" title="Purple"></li>
247 <div class="skin-section skin-states">
251 <div class="state icheckbox_minimal"></div>
252 <div class="state iradio_minimal"></div>
256 <div class="state icheckbox_minimal hover"></div>
257 <div class="state iradio_minimal hover"></div>
261 <div class="state icheckbox_minimal checked"></div>
262 <div class="state iradio_minimal checked"></div>
266 <div class="state icheckbox_minimal disabled"></div>
267 <div class="state iradio_minimal disabled"></div>
271 <div class="state icheckbox_minimal checked disabled"></div>
272 <div class="state iradio_minimal checked disabled"></div>
273 Disabled & checked
278 $(document).ready(function(){
279 $('.skin-minimal input').iCheck({
280 checkboxClass: 'icheckbox_minimal',
281 radioClass: 'iradio_minimal',
287 <dt class="selected">Demo</dt>
289 <div class="skin-pre">
291 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
294 <ol class="skin-usage">
296 Choose a color scheme, there are 10 different styles available:
297 <div class="schemes clear">
299 <li><strong>Black</strong> — minimal.css</li>
300 <li><strong>Red</strong> — red.css</li>
301 <li><strong>Green</strong> — green.css</li>
302 <li><strong>Blue</strong> — blue.css</li>
303 <li><strong>Aero</strong> — aero.css</li>
306 <li><strong>Grey</strong> — grey.css</li>
307 <li><strong>Orange</strong> — orange.css</li>
308 <li><strong>Yellow</strong> — yellow.css</li>
309 <li><strong>Pink</strong> — pink.css</li>
310 <li><strong>Purple</strong> — purple.css</li>
315 Copy <span class="mark">/skins/minimal/</span> folder and <span class="mark">icheck.js</span> file to your site.
318 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
320 <link href="your-path/minimal/color-scheme.css" rel="stylesheet">
321 <script src="your-path/icheck.js"></script>
323 <p>Example for a <strong>Red</strong> color scheme:</p>
325 <link href="your-path/minimal/red.css" rel="stylesheet">
326 <script src="your-path/icheck.js"></script>
330 <p>Add some checkboxes and radio buttons to your HTML:</p>
332 <input type="checkbox">
333 <input type="checkbox" checked>
334 <input type="radio" name="iCheck">
335 <input type="radio" name="iCheck" checked>
339 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
342 $(document).ready(function(){
344 checkboxClass: 'icheckbox_minimal',
345 radioClass: 'iradio_minimal',
346 increaseArea: '20%' <span class="comment">// optional</span>
351 <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
354 $(document).ready(function(){
356 checkboxClass: 'icheckbox_minimal-red',
357 radioClass: 'iradio_minimal-red',
358 increaseArea: '20%' <span class="comment">// optional</span>
370 <div class="skin skin-square">
372 <div class="top" data-to="skin-minimal"></div>
373 <div class="bottom" data-to="skin-flat"></div>
377 <dd class="selected">
378 <div class="skin-section">
382 <input tabindex="9" type="checkbox" id="square-checkbox-1">
383 <label for="square-checkbox-1">Checkbox 1</label>
386 <input tabindex="10" type="checkbox" id="square-checkbox-2" checked>
387 <label for="square-checkbox-2">Checkbox 2</label>
390 <input type="checkbox" id="square-checkbox-disabled" disabled>
391 <label for="square-checkbox-disabled">Disabled</label>
394 <input type="checkbox" id="square-checkbox-disabled-checked" checked disabled>
395 <label for="square-checkbox-disabled-checked">Disabled & checked</label>
400 <input tabindex="11" type="radio" id="square-radio-1" name="square-radio">
401 <label for="square-radio-1">Radio button 1</label>
404 <input tabindex="12" type="radio" id="square-radio-2" name="square-radio" checked>
405 <label for="square-radio-2">Radio button 2</label>
408 <input type="radio" id="square-radio-disabled" disabled>
409 <label for="square-radio-disabled">Disabled</label>
412 <input type="radio" id="square-radio-disabled-checked" checked disabled>
413 <label for="square-radio-disabled-checked">Disabled & checked</label>
416 <div class="colors clear">
417 <strong>Color schemes</strong>
419 <li title="Black"></li>
420 <li class="red" title="Red"></li>
421 <li class="green active" title="Green"></li>
422 <li class="blue" title="Blue"></li>
423 <li class="aero" title="Aero"></li>
424 <li class="grey" title="Grey"></li>
425 <li class="orange" title="Orange"></li>
426 <li class="yellow" title="Yellow"></li>
427 <li class="pink" title="Pink"></li>
428 <li class="purple" title="Purple"></li>
432 <div class="skin-section skin-states">
436 <div class="state icheckbox_square-green"></div>
437 <div class="state iradio_square-green"></div>
441 <div class="state icheckbox_square-green hover"></div>
442 <div class="state iradio_square-green hover"></div>
446 <div class="state icheckbox_square-green checked"></div>
447 <div class="state iradio_square-green checked"></div>
451 <div class="state icheckbox_square-green disabled"></div>
452 <div class="state iradio_square-green disabled"></div>
456 <div class="state icheckbox_square-green checked disabled"></div>
457 <div class="state iradio_square-green checked disabled"></div>
458 Disabled & checked
463 $(document).ready(function(){
464 $('.skin-square input').iCheck({
465 checkboxClass: 'icheckbox_square-green',
466 radioClass: 'iradio_square-green',
472 <dt class="selected">Demo</dt>
474 <div class="skin-pre">
476 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
479 <ol class="skin-usage">
481 Choose a color scheme, there are 10 different styles available:
482 <div class="schemes clear">
484 <li><strong>Black</strong> — square.css</li>
485 <li><strong>Red</strong> — red.css</li>
486 <li><strong>Green</strong> — green.css</li>
487 <li><strong>Blue</strong> — blue.css</li>
488 <li><strong>Aero</strong> — aero.css</li>
491 <li><strong>Grey</strong> — grey.css</li>
492 <li><strong>Orange</strong> — orange.css</li>
493 <li><strong>Yellow</strong> — yellow.css</li>
494 <li><strong>Pink</strong> — pink.css</li>
495 <li><strong>Purple</strong> — purple.css</li>
500 Copy <span class="mark">/skins/square/</span> folder and <span class="mark">icheck.js</span> file to your site.
503 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
505 <link href="your-path/square/color-scheme.css" rel="stylesheet">
506 <script src="your-path/icheck.js"></script>
508 <p>Example for a <strong>Red</strong> color scheme:</p>
510 <link href="your-path/square/red.css" rel="stylesheet">
511 <script src="your-path/icheck.js"></script>
515 <p>Add some checkboxes and radio buttons to your HTML:</p>
517 <input type="checkbox">
518 <input type="checkbox" checked>
519 <input type="radio" name="iCheck">
520 <input type="radio" name="iCheck" checked>
524 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
527 $(document).ready(function(){
529 checkboxClass: 'icheckbox_square',
530 radioClass: 'iradio_square',
531 increaseArea: '20%' <span class="comment">// optional</span>
536 <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
539 $(document).ready(function(){
541 checkboxClass: 'icheckbox_square-red',
542 radioClass: 'iradio_square-red',
543 increaseArea: '20%' <span class="comment">// optional</span>
555 <div class="skin skin-flat">
557 <div class="top" data-to="skin-square"></div>
558 <div class="bottom" data-to="skin-line"></div>
562 <dd class="selected">
563 <div class="skin-section">
567 <input tabindex="13" type="checkbox" id="flat-checkbox-1">
568 <label for="flat-checkbox-1">Checkbox 1</label>
571 <input tabindex="14" type="checkbox" id="flat-checkbox-2" checked>
572 <label for="flat-checkbox-2">Checkbox 2</label>
575 <input type="checkbox" id="flat-checkbox-disabled" disabled>
576 <label for="flat-checkbox-disabled">Disabled</label>
579 <input type="checkbox" id="flat-checkbox-disabled-checked" checked disabled>
580 <label for="flat-checkbox-disabled-checked">Disabled & checked</label>
585 <input tabindex="15" type="radio" id="flat-radio-1" name="flat-radio">
586 <label for="flat-radio-1">Radio button 1</label>
589 <input tabindex="16" type="radio" id="flat-radio-2" name="flat-radio" checked>
590 <label for="flat-radio-2">Radio button 2</label>
593 <input type="radio" id="flat-radio-disabled" disabled>
594 <label for="flat-radio-disabled">Disabled</label>
597 <input type="radio" id="flat-radio-disabled-checked" checked disabled>
598 <label for="flat-radio-disabled-checked">Disabled & checked</label>
601 <div class="colors clear">
602 <strong>Color schemes</strong>
604 <li title="Black"></li>
605 <li class="red active" title="Red"></li>
606 <li class="green" title="Green"></li>
607 <li class="blue" title="Blue"></li>
608 <li class="aero" title="Aero"></li>
609 <li class="grey" title="Grey"></li>
610 <li class="orange" title="Orange"></li>
611 <li class="yellow" title="Yellow"></li>
612 <li class="pink" title="Pink"></li>
613 <li class="purple" title="Purple"></li>
617 <div class="skin-section skin-states">
621 <div class="state icheckbox_flat-red"></div>
622 <div class="state iradio_flat-red"></div>
626 <div class="state icheckbox_flat-red checked"></div>
627 <div class="state iradio_flat-red checked"></div>
631 <div class="state icheckbox_flat-red disabled"></div>
632 <div class="state iradio_flat-red disabled"></div>
636 <div class="state icheckbox_flat-red checked disabled"></div>
637 <div class="state iradio_flat-red checked disabled"></div>
638 Disabled & checked
643 $(document).ready(function(){
644 $('.skin-flat input').iCheck({
645 checkboxClass: 'icheckbox_flat-red',
646 radioClass: 'iradio_flat-red'
651 <dt class="selected">Demo</dt>
653 <div class="skin-pre">
655 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
658 <ol class="skin-usage">
660 Choose a color scheme, there are 10 different styles available:
661 <div class="schemes clear">
663 <li><strong>Black</strong> — flat.css</li>
664 <li><strong>Red</strong> — red.css</li>
665 <li><strong>Green</strong> — green.css</li>
666 <li><strong>Blue</strong> — blue.css</li>
667 <li><strong>Aero</strong> — aero.css</li>
670 <li><strong>Grey</strong> — grey.css</li>
671 <li><strong>Orange</strong> — orange.css</li>
672 <li><strong>Yellow</strong> — yellow.css</li>
673 <li><strong>Pink</strong> — pink.css</li>
674 <li><strong>Purple</strong> — purple.css</li>
679 Copy <span class="mark">/skins/flat/</span> folder and <span class="mark">icheck.js</span> file to your site.
682 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
684 <link href="your-path/flat/color-scheme.css" rel="stylesheet">
685 <script src="your-path/icheck.js"></script>
687 <p>Example for a <strong>Red</strong> color scheme:</p>
689 <link href="your-path/flat/red.css" rel="stylesheet">
690 <script src="your-path/icheck.js"></script>
694 <p>Add some checkboxes and radio buttons to your HTML:</p>
696 <input type="checkbox">
697 <input type="checkbox" checked>
698 <input type="radio" name="iCheck">
699 <input type="radio" name="iCheck" checked>
703 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
706 $(document).ready(function(){
708 checkboxClass: 'icheckbox_flat',
709 radioClass: 'iradio_flat'
714 <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
717 $(document).ready(function(){
719 checkboxClass: 'icheckbox_flat-red',
720 radioClass: 'iradio_flat-red'
732 <div class="skin skin-line">
734 <div class="top" data-to="skin-flat"></div>
735 <div class="bottom" data-to="skin-polaris"></div>
739 <dd class="selected">
740 <div class="skin-section">
744 <input tabindex="17" type="checkbox" id="line-checkbox-1">
745 <label for="line-checkbox-1">Checkbox 1</label>
748 <input tabindex="18" type="checkbox" id="line-checkbox-2" checked>
749 <label for="line-checkbox-2">Checkbox 2</label>
752 <input type="checkbox" id="line-checkbox-disabled" disabled>
753 <label for="line-checkbox-disabled">Disabled</label>
756 <input type="checkbox" id="line-checkbox-disabled-checked" checked disabled>
757 <label for="line-checkbox-disabled-checked">Disabled & checked</label>
762 <input tabindex="19" type="radio" id="line-radio-1" name="line-radio">
763 <label for="line-radio-1">Radio button 1</label>
766 <input tabindex="20" type="radio" id="line-radio-2" name="line-radio" checked>
767 <label for="line-radio-2">Radio button 2</label>
770 <input type="radio" id="line-radio-disabled" disabled>
771 <label for="line-radio-disabled">Disabled</label>
774 <input type="radio" id="line-radio-disabled-checked" checked disabled>
775 <label for="line-radio-disabled-checked">Disabled & checked</label>
778 <div class="colors clear">
779 <strong>Color schemes</strong>
781 <li title="Black"></li>
782 <li class="red" title="Red"></li>
783 <li class="green" title="Green"></li>
784 <li class="blue active" title="Blue"></li>
785 <li class="aero" title="Aero"></li>
786 <li class="grey" title="Grey"></li>
787 <li class="orange" title="Orange"></li>
788 <li class="yellow" title="Yellow"></li>
789 <li class="pink" title="Pink"></li>
790 <li class="purple" title="Purple"></li>
794 <div class="skin-section skin-states">
798 <div class="state icheckbox_line-blue">
799 <div class="icheck_line-icon"></div>
804 <div class="state icheckbox_line-blue hover">
805 <div class="icheck_line-icon"></div>
810 <div class="state icheckbox_line-blue checked">
811 <div class="icheck_line-icon"></div>
816 <div class="state icheckbox_line-blue disabled">
817 <div class="icheck_line-icon"></div>
822 <div class="state icheckbox_line-blue checked disabled">
823 <div class="icheck_line-icon"></div>
824 Disabled & checked
830 $(document).ready(function(){
831 $('.skin-line input').each(function(){
834 label_text = label.text();
838 checkboxClass: 'icheckbox_line-blue',
839 radioClass: 'iradio_line-blue',
840 insert: '<div class="icheck_line-icon"></div>' + label_text
846 <dt class="selected">Demo</dt>
848 <div class="skin-pre">
850 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
853 <ol class="skin-usage">
855 Choose a color scheme, there are 10 different styles available:
856 <div class="schemes clear">
858 <li><strong>Black</strong> — line.css</li>
859 <li><strong>Red</strong> — red.css</li>
860 <li><strong>Green</strong> — green.css</li>
861 <li><strong>Blue</strong> — blue.css</li>
862 <li><strong>Aero</strong> — aero.css</li>
865 <li><strong>Grey</strong> — grey.css</li>
866 <li><strong>Orange</strong> — orange.css</li>
867 <li><strong>Yellow</strong> — yellow.css</li>
868 <li><strong>Pink</strong> — pink.css</li>
869 <li><strong>Purple</strong> — purple.css</li>
874 Copy <span class="mark">/skins/line/</span> folder and <span class="mark">icheck.js</span> file to your site.
877 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
879 <link href="your-path/line/color-scheme.css" rel="stylesheet">
880 <script src="your-path/icheck.js"></script>
882 <p>Example for a <strong>Red</strong> color scheme:</p>
884 <link href="your-path/line/red.css" rel="stylesheet">
885 <script src="your-path/icheck.js"></script>
889 <p>Add some checkboxes, radio buttons and labels to your HTML:</p>
891 <input type="checkbox">
892 <label>Checkbox 1</label>
894 <input type="checkbox" checked>
895 <label>Checkbox 2</label>
897 <input type="radio" name="iCheck">
898 <label>Radio button 1</label>
900 <input type="radio" name="iCheck" checked>
901 <label>Radio button 2</label>
905 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
908 $(document).ready(function(){
909 $('input').each(function(){
912 label_text = label.text();
916 checkboxClass: 'icheckbox_line',
917 radioClass: 'iradio_line',
918 insert: '<div class="icheck_line-icon"></div>' + label_text
924 <p>For different from black color schemes use this code (example for <strong>Red</strong>):</p>
927 $(document).ready(function(){
928 $('input').each(function(){
931 label_text = label.text();
935 checkboxClass: 'icheckbox_line-red',
936 radioClass: 'iradio_line-red',
937 insert: '<div class="icheck_line-icon"></div>' + label_text
950 <div class="skin skin-polaris">
952 <div class="top" data-to="skin-line"></div>
953 <div class="bottom" data-to="skin-futurico"></div>
955 <h3>Polaris skin</h3>
957 <dd class="selected">
958 <div class="skin-section">
962 <input tabindex="21" type="checkbox" id="polaris-checkbox-1">
963 <label for="polaris-checkbox-1">Checkbox 1</label>
966 <input tabindex="22" type="checkbox" id="polaris-checkbox-2" checked>
967 <label for="polaris-checkbox-2">Checkbox 2</label>
970 <input type="checkbox" id="polaris-checkbox-disabled" disabled>
971 <label for="polaris-checkbox-disabled">Disabled</label>
974 <input type="checkbox" id="polaris-checkbox-disabled-checked" checked disabled>
975 <label for="polaris-checkbox-disabled-checked">Disabled & checked</label>
980 <input tabindex="23" type="radio" id="polaris-radio-1" name="polaris-radio">
981 <label for="polaris-radio-1">Radio button 1</label>
984 <input tabindex="24" type="radio" id="polaris-radio-2" name="polaris-radio" checked>
985 <label for="polaris-radio-2">Radio button 2</label>
988 <input type="radio" id="polaris-radio-disabled" disabled>
989 <label for="polaris-radio-disabled">Disabled</label>
992 <input type="radio" id="polaris-radio-disabled-checked" checked disabled>
993 <label for="polaris-radio-disabled-checked">Disabled & checked</label>
997 <div class="skin-section skin-states">
1001 <div class="state icheckbox_polaris"></div>
1002 <div class="state iradio_polaris"></div>
1006 <div class="state icheckbox_polaris hover"></div>
1007 <div class="state iradio_polaris hover"></div>
1011 <div class="state icheckbox_polaris checked"></div>
1012 <div class="state iradio_polaris checked"></div>
1016 <div class="state icheckbox_polaris disabled"></div>
1017 <div class="state iradio_polaris disabled"></div>
1021 <div class="state icheckbox_polaris checked disabled"></div>
1022 <div class="state iradio_polaris checked disabled"></div>
1023 Disabled & checked
1028 $(document).ready(function(){
1029 $('.skin-polaris input').iCheck({
1030 checkboxClass: 'icheckbox_polaris',
1031 radioClass: 'iradio_polaris',
1032 increaseArea: '-10%'
1037 <dt class="selected">Demo</dt>
1039 <div class="skin-pre">
1041 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
1044 <ol class="skin-usage">
1046 Copy <span class="mark">/skins/polaris/</span> folder and <span class="mark">icheck.js</span> file to your site.
1049 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
1050 <pre class="markup">
1051 <link href="your-path/polaris/polaris.css" rel="stylesheet">
1052 <script src="your-path/icheck.js"></script>
1056 <p>Add some checkboxes and radio buttons to your HTML:</p>
1057 <pre class="markup">
1058 <input type="checkbox">
1059 <input type="checkbox" checked>
1060 <input type="radio" name="iCheck">
1061 <input type="radio" name="iCheck" checked>
1065 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
1066 <pre class="markup">
1068 $(document).ready(function(){
1070 checkboxClass: 'icheckbox_polaris',
1071 radioClass: 'iradio_polaris',
1072 increaseArea: '-10%' <span class="comment">// optional</span>
1084 <div class="skin skin-futurico">
1085 <div class="arrows">
1086 <div class="top" data-to="skin-polaris"></div>
1087 <div class="bottom" data-to="usage"></div>
1089 <h3>Futurico skin</h3>
1091 <dd class="selected">
1092 <div class="skin-section">
1096 <input tabindex="25" type="checkbox" id="futurico-checkbox-1">
1097 <label for="futurico-checkbox-1">Checkbox 1</label>
1100 <input tabindex="26" type="checkbox" id="futurico-checkbox-2" checked>
1101 <label for="futurico-checkbox-2">Checkbox 2</label>
1104 <input type="checkbox" id="futurico-checkbox-disabled" disabled>
1105 <label for="futurico-checkbox-disabled">Disabled</label>
1108 <input type="checkbox" id="futurico-checkbox-disabled-checked" checked disabled>
1109 <label for="futurico-checkbox-disabled-checked">Disabled & checked</label>
1114 <input tabindex="27" type="radio" id="futurico-radio-1" name="futurico-radio">
1115 <label for="futurico-radio-1">Radio button 1</label>
1118 <input tabindex="28" type="radio" id="futurico-radio-2" name="futurico-radio" checked>
1119 <label for="futurico-radio-2">Radio button 2</label>
1122 <input type="radio" id="futurico-radio-disabled" disabled>
1123 <label for="futurico-radio-disabled">Disabled</label>
1126 <input type="radio" id="futurico-radio-disabled-checked" checked disabled>
1127 <label for="futurico-radio-disabled-checked">Disabled & checked</label>
1131 <div class="skin-section skin-states">
1135 <div class="state icheckbox_futurico"></div>
1136 <div class="state iradio_futurico"></div>
1140 <div class="state icheckbox_futurico checked"></div>
1141 <div class="state iradio_futurico checked"></div>
1145 <div class="state icheckbox_futurico disabled"></div>
1146 <div class="state iradio_futurico disabled"></div>
1150 <div class="state icheckbox_futurico checked disabled"></div>
1151 <div class="state iradio_futurico checked disabled"></div>
1152 Disabled & checked
1157 $(document).ready(function(){
1158 $('.skin-futurico input').iCheck({
1159 checkboxClass: 'icheckbox_futurico',
1160 radioClass: 'iradio_futurico',
1166 <dt class="selected">Demo</dt>
1168 <div class="skin-pre">
1170 Make sure <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]) is loaded before the <span class="mark">icheck.js</span>.
1173 <ol class="skin-usage">
1175 Copy <span class="mark">/skins/futurico/</span> folder and <span class="mark">icheck.js</span> file to your site.
1178 <p>Insert before <span class="mark"></head></span> in your HTML (replace <span class="mark">your-path</span> and <span class="mark">color-scheme</span>):</p>
1179 <pre class="markup">
1180 <link href="your-path/futurico/futurico.css" rel="stylesheet">
1181 <script src="your-path/icheck.js"></script>
1185 <p>Add some checkboxes and radio buttons to your HTML:</p>
1186 <pre class="markup">
1187 <input type="checkbox">
1188 <input type="checkbox" checked>
1189 <input type="radio" name="iCheck">
1190 <input type="radio" name="iCheck" checked>
1194 <p>Add JavaScript to your HTML to launch iCheck plugin:</p>
1195 <pre class="markup">
1197 $(document).ready(function(){
1199 checkboxClass: 'icheckbox_futurico',
1200 radioClass: 'iradio_futurico',
1201 increaseArea: '20%' <span class="comment">// optional</span>
1213 <div class="skins-info">
1214 <p>All skins (except Line) are transparent, you may use them on any background.</p>
1215 <p><a href="http://designmodo.com/square/?u=718" target="blank">Square</a>, <a href="http://designmodo.com/flat/?u=718" target="blank">Flat</a>, <a href="http://designmodo.com/?u=718" target="blank">Polaris</a> and <a href="http://designmodo.com/futuricopro/?u=718" target="blank">Futurico</a> skins are based on <a href="http://designmodo.com/shop/?u=718" target="blank">Designmodo's UI packs</a>.</p>
1216 <p class="skins-banner">
1217 <a href="http://designmodo.com/shop/?u=718" target="blank">Awesome UI packs</a>
1222 <div class="arrows">
1223 <div class="top" data-to="skin-futurico"></div>
1224 <div class="bottom" data-to="comparison"></div>
1226 <h2>Simple usage</h2>
1227 <div class="usage-inner">
1229 iCheck plugin works with checkboxes and radio buttons like a constructor.
1230 <br><strong>It wraps each input with a div</strong>, which may be customized by you or using one of the <span class="self" data-to="skins">available skins</span>.
1231 <br>You may also place inside that div some HTML code or text using <span class="mark">insert</span> option.
1233 <p class="offset">For this HTML:</p>
1234 <pre class="markup">
1236 <input type="checkbox" name="quux[1]" disabled>
1240 <label for="baz[1]">Bar</label>
1241 <input type="radio" name="quux[2]" id="baz[1]" checked>
1243 <label for="baz[2]">Bar</label>
1244 <input type="radio" name="quux[2]" id="baz[2]">
1246 <p class="offset">With default options you'll get nearly this:</p>
1247 <pre class="markup">
1249 <div class="icheckbox disabled">
1250 <input type="checkbox" name="quux[1]" disabled>
1255 <label for="baz[1]">Bar</label>
1256 <div class="iradio checked">
1257 <input type="radio" name="quux[2]" id="baz[1]" checked>
1260 <label for="baz[2]">Bar</label>
1261 <div class="iradio">
1262 <input type="radio" name="quux[2]" id="baz[2]">
1265 <p><strong>By default, iCheck doesn't provide any CSS styles for wrapper divs</strong> (if you don't use <span class="self" data-to="skins">skins</span>).</p>
1266 <h4 class="options">Options</h4>
1267 <p>These options are default:</p>
1268 <pre class="markup">
1270 <span class="comment">// 'checkbox' or 'radio' to style only checkboxes or radio buttons, both by default</span>
1273 <span class="comment">// base class added to customized checkboxes</span>
1274 checkboxClass: 'icheckbox',
1276 <span class="comment">// base class added to customized radio buttons</span>
1277 radioClass: 'iradio',
1279 <span class="comment">// class added on checked state (input.checked = true)</span>
1280 checkedClass: 'checked',
1282 <span class="comment">// if not empty, used instead of 'checkedClass' option (input type specific)</span>
1283 checkedCheckboxClass: '',
1284 checkedRadioClass: '',
1286 <span class="comment">// if not empty, added as class name on unchecked state (input.checked = false)</span>
1289 <span class="comment">// if not empty, used instead of 'uncheckedClass' option (input type specific)</span>
1290 uncheckedCheckboxClass: '',
1291 uncheckedRadioClass: '',
1293 <span class="comment">// class added on disabled state (input.disabled = true)</span>
1294 disabledClass: 'disabled',
1296 <span class="comment">// if not empty, used instead of 'disabledClass' option (input type specific)</span>
1297 disabledCheckboxClass: '',
1298 disabledRadioClass: '',
1300 <span class="comment">// if not empty, added as class name on enabled state (input.disabled = false)</span>
1303 <span class="comment">// if not empty, used instead of 'enabledClass' option (input type specific)</span>
1304 enabledCheckboxClass: '',
1305 enabledRadioClass: '',
1307 <span class="comment">// class added on <span class="self" data-to="indeterminate">indeterminate state</span> (input.indeterminate = true)</span>
1308 indeterminateClass: 'indeterminate',
1310 <span class="comment">// if not empty, used instead of 'indeterminateClass' option (input type specific)</span>
1311 indeterminateCheckboxClass: '',
1312 indeterminateRadioClass: '',
1314 <span class="comment">// if not empty, added as class name on determinate state (input.indeterminate = false)</span>
1315 determinateClass: '',
1317 <span class="comment">// if not empty, used instead of 'determinateClass' option (input type specific)</span>
1318 determinateCheckboxClass: '',
1319 determinateRadioClass: '',
1321 <span class="comment">// class added on hover state (pointer is moved onto input)</span>
1322 hoverClass: 'hover',
1324 <span class="comment">// class added on focus state (input has gained focus)</span>
1325 focusClass: 'focus',
1327 <span class="comment">// class added on active state (mouse button is pressed on input)</span>
1328 activeClass: 'active',
1330 <span class="comment">// adds hoverClass to customized input on label hover and labelHoverClass to label on input hover</span>
1333 <span class="comment">// class added to label if labelHover set to true</span>
1334 labelHoverClass: 'hover',
1336 <span class="comment">// increase clickable area by given % (negative number to decrease)</span>
1339 <span class="comment">// true to set 'pointer' CSS cursor over enabled inputs and 'default' over disabled</span>
1342 <span class="comment">// set true to inherit original input's class name</span>
1343 inheritClass: false,
1345 <span class="comment">// if set to true, input's id is prefixed with 'iCheck-' and attached</span>
1348 <span class="comment">// set true to activate ARIA support</span>
1351 <span class="comment">// add HTML code or text inside customized input</span>
1355 <p>There's no need to copy and paste all of them, you can just mention the ones you need:</p>
1356 <pre class="markup">
1362 <p>You can choose any class names and slyle them as you want.</p>
1363 <h4 class="init">Initialize</h4>
1364 <p>Just include <span class="mark">icheck.js</span> after <a href="http://jquery.com" target="blank">jQuery v1.7+</a> (or <a href="http://github.com/madrobby/zepto#zepto-modules" target="blank">Zepto</a> [polyfill, event, data]).</p>
1365 <p>iCheck supports any selectors, but handles only checkboxes and radio buttons:</p>
1366 <pre class="markup">
1367 <span class="comment">// customize all inputs (will search for checkboxes and radio buttons)</span>
1368 $('input').iCheck();
1370 <span class="comment">// handle inputs only inside $('.block')</span>
1371 $('.block input').iCheck();
1373 <span class="comment">// handle only checkboxes inside $('.test')</span>
1374 $('.test input').iCheck({
1378 <span class="comment">// handle .vote class elements (will search inside the element, if it's not an input)</span>
1379 $('.vote').iCheck();
1381 <span class="comment">// you can also change options after inputs are customized</span>
1382 $('input.some').iCheck({
1383 <span class="comment">// different options</span>
1386 <h4 class="indeterminate">Indeterminate</h4>
1387 <p>HTML5 allows specifying <a href="http://css-tricks.com/indeterminate-checkboxes/" target="blank">indeterminate</a> ("partially" checked) state for checkboxes. iCheck supports it for both checkboxes and radio buttons.</p>
1388 <p>You can make an input indeterminate through HTML using additional attributes (supported by iCheck). Both do the same job, but <span class="mark">indeterminate="true"</span> may not work in some browsers (like IE7):</p>
1389 <pre class="markup">
1390 <span class="comment"><!-- indeterminate="true" --></span>
1391 <input type="checkbox" indeterminate="true">
1392 <input type="radio" indeterminate="true">
1394 <span class="comment"><!-- determinate="false" --></span>
1395 <input type="checkbox" determinate="false">
1396 <input type="radio" determinate="false">
1398 <p><span class="mark">indeterminate</span> and <span class="mark">determinate</span> <span class="self" data-to="methods">methods</span> can be used to toggle indeterminate state.</p>
1399 <h4 class="callbacks">Callbacks</h4>
1400 <p class="callbacks-info">iCheck provides plenty callbacks, which may be used to handle changes.</p>
1404 <th>Callback name</th>
1411 <td>user clicked on a customized input or an assigned label</td>
1415 <td>input's <span class="mark">checked</span>, <span class="mark">disabled</span> or <span class="mark">indeterminate</span> state is changed</td>
1419 <td>input's state is changed to <span class="mark">checked</span></td>
1422 <th>ifUnchecked</th>
1423 <td><span class="mark">checked</span> state is removed</td>
1427 <td>input's <span class="mark">checked</span> state is changed</td>
1431 <td>input's state is changed to <span class="mark">disabled</span></td>
1435 <td><span class="mark">disabled</span> state is removed</td>
1438 <th>ifIndeterminate</th>
1439 <td>input's state is changed to <span class="mark">indeterminate</span></td>
1442 <th>ifDeterminate</th>
1443 <td><span class="mark">indeterminate</span> state is removed</td>
1447 <td>input is just customized</td>
1450 <th>ifDestroyed</th>
1451 <td>customization is just removed</td>
1455 <p>Use <span class="mark">on()</span> method to bind them to inputs:<p>
1456 <pre class="markup">
1457 $('input').on('ifChecked', function(event){
1458 alert(event.type + ' callback');
1461 <p><span class="mark">ifCreated</span> callback should be binded before plugin init.</p>
1462 <h4 class="methods">Methods</h4>
1463 <p class="methods-info">These methods can be used to make changes programmatically (any selectors can be used):</p>
1464 <p><span class="mark">$('input').iCheck('check');</span> — change input's state to <span class="mark">checked</span></p>
1465 <p><span class="mark">$('input').iCheck('uncheck');</span> — remove <span class="mark">checked</span> state</p>
1466 <p><span class="mark">$('input').iCheck('toggle');</span> — toggle <span class="mark">checked</span> state</p>
1467 <p><span class="mark">$('input').iCheck('disable');</span> — change input's state to <span class="mark">disabled</span></p>
1468 <p><span class="mark">$('input').iCheck('enable');</span> — remove <span class="mark">disabled</span> state</p>
1469 <p><span class="mark">$('input').iCheck('indeterminate');</span> — change input's state to <span class="mark">indeterminate</span></p>
1470 <p><span class="mark">$('input').iCheck('determinate');</span> — remove <span class="mark">indeterminate</span> state</p>
1471 <p><span class="mark">$('input').iCheck('update');</span> — apply input changes, which were done outside the plugin</p>
1472 <p><span class="mark">$('input').iCheck('destroy');</span> — remove all traces of iCheck</p>
1473 <p class="methods-callback">You may also specify some function, that will be executed on each method call:</p>
1474 <pre class="markup">
1475 $('input').iCheck('check', function(){
1476 alert('Well done, Sir');
1479 <p class="issue-tracker">Feel free to <a href="http://github.com/fronteed/iCheck/">fork and submit pull-request</a> or <a href="http://github.com/fronteed/iCheck/issues">submit an issue</a> if you find something not working.</p>
1482 <div class="benefits comparison">
1483 <div class="arrows">
1484 <div class="top" data-to="usage"></div>
1485 <div class="bottom" data-to="download"></div>
1488 <div class="benefits-inner">
1489 <p>iCheck is created to avoid routine of reinventing the wheel when working with checkboxes and radio buttons. It provides an expected identical result for the huge number of browsers, devices and their versions. Callbacks and methods can be used to easily handle and make changes at customized inputs.</p>
1490 <p>There are some CSS3 ways available to style checkboxes and radio buttons, like <a href="http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-easy-css3-checkboxes-and-radio-buttons/" target="blank">this one</a>. You have to know about some of the disadvantages of similar methods:</p>
1493 — inputs are keyboard inaccessible, since <span class="mark">display: none</span> or <span class="mark">visibility: hidden</span> used to hide them
1496 — poor browser support
1499 — multiple bugs on mobile devices
1502 — tricky, harder to maintain CSS code
1505 — JavaScript is still needed to fix specific issues
1508 <p>While CSS3 method is quite limited solution, iCheck is made to be an everyday replacement covering most of the tasks.</p>
1511 <div class="browsers">
1512 <h2>Browser support</h2>
1513 <div class="browsers-inner">
1514 <p>iCheck is verified to work in Internet Explorer 6+, Firefox 2+, Opera 9+, Google Chrome and Safari browsers. Should also work in many others.</p>
1515 <p>Mobile browsers (like Opera mini, Chrome mobile, Safari mobile, Android browser, Silk and others) are also supported. Tested on iOS (iPad, iPhone, iPod), Android, BlackBerry and Windows Phone devices.</p>
1518 <div class="download">
1519 <a href="http://github.com/fronteed/iCheck/">Download plugin</a>
1521 <div class="license">iCheck plugin is released under the <a href="http://en.wikipedia.org/wiki/MIT_License" target="blank">MIT License</a>. Feel free to use it in personal and commercial projects.</div>
1523 <div class="footer">
1524 <div class="footer-inner clear">
1527 <a href="https://github.com/fronteed/iCheck">Star on Github</a>
1530 <a href="https://twitter.com/intent/tweet?text=Highly customizable checkboxes and radio buttons&url=http://fronteed.com/iCheck/&via=fronteed&hashtags=jQuery,Zepto">Share on Twitter</a>
1533 <a href="http://twitter.com/fronteed/">Follow @fronteed</a>
1537 Created by <a href="http://fronteed.com/">Damir Sultanov</a>
1541 <a href="http://github.com/fronteed/iCheck/" class="fork-me">Fork me on GitHub</a>
1544 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\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