web/_javascript/commons/checkbox.js

13 lines
394 B
JavaScript
Raw Normal View History

/*
* Create a more beautiful checkbox
*/
$(function() {
2020-12-14 10:01:05 +03:00
/* hide browser default checkbox */
$("input[type=checkbox]").addClass("unloaded");
/* create checked checkbox */
$("input[type=checkbox][checked]").before("<i class=\"fas fa-check-circle checked\"></i>");
/* create normal checkbox */
$("input[type=checkbox]:not([checked])").before("<i class=\"far fa-circle\"></i>");
});