This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • in reply to: Child terms unticked by default #38479
    theapetheape
    Participant

    I’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.

    in reply to: Child terms unticked by default #38473
    theapetheape
    Participant

    You cannot access this content.

    in reply to: Child terms unticked by default #38472
    theapetheape
    Participant

    Thank 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.

    in reply to: Child terms unticked by default #38458
    theapetheape
    Participant

    To 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.

Viewing 4 posts - 16 through 19 (of 19 total)