🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Checkator is a jQuery-based replacement for radio and checkbox elements. It supports css styling, and affects the original radio or checkbox element directly, which is used as the data container.

Forms Plugins

Documentation

Checkator

Checkator is a jQuery-based replacement for radio and checkbox elements. It supports css styling, and affects the original radio or checkbox element directly, which is used as the data container. You can see a demo here.

Usage

include in head:
<link rel="stylesheet" href="fm.checkator.jquery.css"/> <script src="jquery-1.11.0.min.js"></script> <script src="fm.checkator.jquery.js"></script>
to activate replacement:
$('.radio_or_checkbox').checkator();

If you don't wan't to meddle with scripting, there is an alternative to activate replacement, by using inline markup.

<input type="checkbox" class="checkator">

HTML mangling

The plugin will wrap the original elements inside divs, and add a div after original element, like shown below:

Before:

<input type="radio" name="radio1" class="radio1" id="radio1_1">

After:

<div class="checkator_holder radio"> 	<input type="radio" name="radio1" class="radio1 checkator_source" id="radio1_1" style="opacity: 0;"> 	<div id="checkator_radio1_1" class="checkator radio"></div> </div>

CSS classes

Here is a list of all the css classes

Class Description
checkator This is the new radio or checkbox element. It has some extra classes called radio and checkbox, which tell if it is a radio button or a checkbox.
prefix_holder The holder for the original element and the new replacement element.
prefix_chosen_item The holder for the chosen item.

DOM Structure

  • holder: containing the radio|checkbox class
    • source
    • checkator

jQuery methods

Method Description
destroy This method is used to remove the instance of the plugin from the radio or checkbox and restore it to its original state.
Method usage
$('#selectBox').checkator('destroy');

Browser compatibility

  • IE 9+
  • Chrome 2+
  • Firefox 3.5+
  • Safari 4+
  • Opera 10.5+

Copyright and license

The MIT License (MIT)

Copyright (c) 2013 Qodio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


You May Also Like