Skip to content

cmcheckbox is a lightweight jQuery plugin for creating customized HTML checkboxes using Font Awesome

Notifications You must be signed in to change notification settings

yiannisdesp/cmcheckbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

cmcheckbox jQuery Plugin v1.0

Read Documentation

Dependencies

  • jQuery 1.9+
  • FontAwesome

Installation

  • Include cmcheckbox.min.js

How it works

HTML:
<label class="cmcheckbox white thin">
	<input type="checkbox" checked>
	<span>Alloy Wheels</span>
</label>
JavaScript:
$(".cmcheckbox").cmcheckbox(); // with default options
$(".cmcheckbox").cmcheckbox({ // with custom options
    // options here
});

Options

{
    // checked state
	checkedColor: "#fff",
    checkedBackgroundColor: "transparent",
    checkedBorderWidth: "2px",
    checkedBorderColor : "#556b2f",
    checkedFaClass : "fa-check",
    checkedFaSize : "23px",
    
    // unchecked state
	uncheckedColor: "#fff",
    uncheckedBackgroundColor: "#fff",
    uncheckedBorderWidth: "2px",
    uncheckedBorderColor : "#556b2f",
    uncheckedFaClass : "",
    uncheckedFaSize : "25px",
    
    // general
	width : "25px",
	height : "25px",
	
	// callbacks
	onCheck: function() {
		// checked jQuery element:
		console.log( $(this) );
	},
	onUncheck: function() {
		// unchecked jQuery element:
		console.log( $(this) );
	}
}

License

cmcheckbox plugin is released under the MIT License. Feel free to use it in personal and commercial projects.

About

cmcheckbox is a lightweight jQuery plugin for creating customized HTML checkboxes using Font Awesome

Resources

Stars

Watchers

Forks

Packages

No packages published