check tree

Forums › Forums › Search & Filter Pro › check tree

Viewing 10 posts – 1 through 10 (of 14 total)
  • Anonymous
    #41076

    Hi,
    There are many items in my category, so I wish I can use “check tree” to show it.
    Is any possible way for me to change the input type?

    Trevor
    #41090

    I am not entirely sure what you mean by a Check tree, but I guess you mean that the categories are shown in a select box, with categories and sub-categories? And you somehow want to collapse/open these in sections? If you were able to show an example of what you have and what you want?

    Anonymous
    #41368
    This reply has been marked as private.
    Trevor
    #41376

    It is an idea we could investigate, but it is not possible in the current version.

    Ross Moderator
    #41705

    Hi James

    Actually it is possible using some clever CSS 🙂

    Add this to your themes CSS file:

    .searchandfilter input[type='checkbox'] + label + ul
    {
    	display:none;
    	
    }
    .searchandfilter input[type='checkbox'][checked='checked'] + label + ul
    {
    	display:block;
    	
    }

    Thanks!

    Anonymous
    #42018

    Hi Ross,
    Thank you for your help. But when I click the check box in front of the categories, it doesn’t show the sub-categories. Is it right?

    Trevor
    #42021

    Hi James

    Unfortunately, the CSS does not work with the way jQuery handles checked checkboxes. The second part of the code would need to be:

    .searchandfilter input[type='checkbox']:checked + label + ul
    {
    	display:block;
    	
    }

    I think. The technical reason is that the first method looks at the checked attribute of the input, but with jQuery, it never adds checked="checked" to the element when you click it (which is the attribute), instead it changes the DOM property of the element, and the way I have re-written it checks that property.

    Anonymous
    #42022

    🙂
    Hi Trevor,
    Thank you for all your help. It’s work!!!

    Trevor
    #42023

    Can I now mark this as resolved and close the thread?

    Anonymous
    #42024

    The last question~
    I find it can’t show in the sidebar…

Viewing 10 posts – 1 through 10 (of 14 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.