Forum Replies Created
-
AuthorPosts
-
theape
ParticipantI’m so close, I don’t know if you can help nudge it over the line.
jQuery(function($){ $('*[data-lvl]').removeAttr('data-lvl'); $(".asp_option_cat_level-1").hide(); $(".asp_option_cat_level-2").hide(); $(".asp_option_cat_level-0").click(function(){ $(this).siblings('.asp_option_cat_level-1').toggle(); $(this).siblings('.asp_option_cat_level-2').hide(); }); $(".asp_option_cat_level-1").click(function(){ $(this).siblings('.asp_option_cat_level-2').toggle(); }); });How do I get this hide/show only the children of the checked parent rather than all of the children when a parent is clicked? I also need to figure out how to have the children automatically unchecked when a parent is unchecked.
theape
ParticipantYou cannot access this content.
theape
ParticipantThank you, it does exactly what I asked for. 🙂
The problem I have now, is there anyway to make the code more specific to those checkboxes?
It disables/overrides the “Frontend Search Settings > Categories & Taxonomy Terms > Hide child terms, where the parent checkbox is unchecked?” option. And I’m worried it might have other knock on effects on the website.
theape
ParticipantTo add, I have everything un-checked. The children are ticked when the parent is ticked, I only want the parent ticked when it’s clicked.
-
AuthorPosts