-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategoryList.min.js
More file actions
5 lines (5 loc) · 944 Bytes
/
categoryList.min.js
File metadata and controls
5 lines (5 loc) · 944 Bytes
1
2
3
4
5
/*
categoryList.js Copyright (C) 2017 Anıl Yarkın Yücel - GNU General Public License v3.0
http://sheptang.com/software/categoryList
*/
function checkboxClick(elem){if($("#"+elem).hasClass("parent")){var boxType="cat";if($("input#"+elem).is(":checked")){$("input#"+elem).parents(".cat").parent().find("input[type='checkbox']").prop("checked",true);}else if($("input#"+elem).not(":checked")){$("input#"+elem).parents(".cat").parent().find("input[type='checkbox']").prop("checked",false);}}else if($("#"+elem).hasClass("child")){var boxType="sub";var subsCat=$("input#"+elem).parents(".subcont").siblings(".cat").find("input[type='checkbox']");if($("input#"+elem).is(":checked") && $(subsCat).not(":checked")){$(subsCat).prop("checked",true);}else if($("input#"+elem).not(":checked") && $(subsCat).is(":checked")){if($("input#"+elem).parents(".subcont").find(".child").filter(":checked").length==0){$(subsCat).prop("checked",false);}}}}