web/assets/js/_commons/checkbox.js
2020-12-15 00:39:50 +08:00

12 lines
352 B
JavaScript

/*
* Create a more beautiful checkbox
*/
$(function() {
/* hide browser default checkbox */
$("input[type=checkbox]").addClass("unloaded");
/* create checked checkbox */
$("input[type=checkbox][checked]").before("<span checked></span>");
/* create normal checkbox */
$("input[type=checkbox]:not([checked])").before("<span></span>");
});