1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

Always load browser default checkbox

This commit is contained in:
Cotes Chung
2020-12-14 15:01:05 +08:00
parent dc88321ed5
commit aba3d25d7a
3 changed files with 26 additions and 15 deletions

View File

@@ -3,10 +3,10 @@
*/
$(function() {
/* hide bullet of checkbox item */
$("li.task-list-item:has(input)").attr("hide-bullet", "");
/* hide browser default checkbox */
$("input[type=checkbox]").addClass("unloaded");
/* create checked checkbox */
$("input[type=checkbox][checked=checked]").before("<span checked></span>");
$("input[type=checkbox][checked]").before("<span checked></span>");
/* create normal checkbox */
$("input[type=checkbox]:not([checked=checked])").before("<span></span>");
$("input[type=checkbox]:not([checked])").before("<span></span>");
});