Add unique class or id to selections in multi type combo box

Forums › Forums › Search & Filter Pro › Add unique class or id to selections in multi type combo box

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #249556

    Hi,

    Is there a way to add a custom class or id to each selection option in a multi-select combo box element,
    so that <li class=”search-choice”> will become <li class=”search-choice [custom css here]”> for each li option in the multi-select list?

    Trevor
    #249560

    Are you using the Chosen or Select2 script for comboboxes (it is an option in our plugin settings)? I would recommend Select2. If, after changing this, are you able to send me a live link/URL to your search page so I can take a look? I may have an idea.

    Anonymous
    #249583
    This reply has been marked as private.
    Anonymous
    #249587

    Thanks Trevor, I actually managed to find a css only solution for this by creating a css rule for title attribute, like this:

    li.select2-selection__choice[title="YOUR_CUSTOM_TITLE"] {
         ***Your Css Here***
    }
    Trevor
    #249589

    That was along the lines I was thing, so thanks for sharing. I will close this thread for now.

Viewing 5 posts – 1 through 5 (of 5 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.