JSFiddle - React, Tailwind, and code Playground
by Ehsan Sajjad
HTML
<input type="checkbox" name="checkboxG1" id="checkboxG1" class="css-checkbox" />
<label for="checkboxG1" class="css-label">Checkbox</label>
CSS
input[type=checkbox].css-checkbox {
display:none;
}
input[type=checkbox].css-checkbox + label.css-label {
padding-left:40px;
height:35px;
display:inline-block;
line-height:35px;
background-repeat:no-repeat;
background-position: 0 0;
font-size:35px;
vertical-align:middle;
cursor:pointer;
}
input[type=checkbox].css-checkbox:checked + label.css-label {
background-position: 0 -35px;
}
label.css-label {
background-image:url(http://csscheckbox.com/checkboxes/u/csscheckbox_24c8e0ab5bf881ded2cd411c79196aae.png);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
JavaScript
$('#checkboxG1').change(function () {
alert("test");
});