Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9234755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:51:50+00:00 2026-06-18T06:51:50+00:00

I need to method to implement something similar to what is on this webpage

  • 0

I need to method to implement something similar to what is on this webpage

http://www.brownthomas.com/brands/

I will have a list of brands on the page. each brand should have 3 pieces of information:

  1. starting letter
  2. store (could be mulitple)
  3. category (could be mulitple)

So I need 3 select boxes, when one of the select boxes is selected it will filter the brands underneath based on this.

I would like the filter to happen within the browser through javascript.

So I was thinking, I some how add some extra information on the brands, and then remove everything from view that does not match the select box criteria.

Any idea how I could achieve this?

Also I will be using wordpress and Advanced Custom Fields to achieve this from the backend in terms of entering the brands. I just dont know where to start.

i was thinking something like this

<div classs="brand-holder">
    <div class="brand-column">
        <h3>0-9</h3>
        <ul class="brand-list">
            <li data-alpha="0" data-store="Arnotts,BrownThomas" data-category="Mens Wear, Shoes">Brand name</li>

        </ul>

    </div>
    <div class="brand-column">
        <h3>A</h3>
        <ul class="brand-list">
            <li data-alpha="A" data-alpha="A" data-store="Arnotts,Dundrum" data-category="Womens Wear, Cosmetics" >A Brand Name</li>

        </ul>

    </div>

</div>

But I don’t know how, I would build this in the backend.

==========edit added=========
i want to the backend doesn’t allow me segregate the categories relevant to the stores . here is an example Chanel, Brown Thomas Sells women’s wear, footwear,jewellery and accessories and beauty. Arnotts only sells beauty. Dundrum sells beauty and accessories. how would i achieve this?

i was thinking something like this would work for layout , but i wouldnt know the javascript to work with the select boxes

<div classs="brand-holder">

<div class="brand-column">
    <h3>A</h3>
    <ul class="brand-list">
        <li data-alpha="A" data-store="Arnotts,Dundrum,brownThomas" data-arnotts-category="Womens Wear, Cosmetics" data-dundrum-category="Womens Wear" data-brownThomas-category="Beauty" >A Brand Name <i>[store:Arnotts,Dundrum :: category: Womens Wear, Cosmetics]</i></li>
    </ul>
</div>

-== edit added======

This is how the information is selected in the backend at the moment,

enter image description here

but i need it so it will work with something like this

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:51:52+00:00Added an answer on June 18, 2026 at 6:51 am

    Here is your code… Live Demo

    HTML

    No change in your data part, just added the select elements.

    <select id="alpha" onchange="selectData();">
        <option value="">Choose A-Z</option>
        <option value="0">0-9</option>
        <option value="A">A</option>
        <option value="B">B</option>
        <option value="C">C</option>
        <option value="D">D</option>
    </select>
    <select id="store" onchange="selectData();">
        <option value="">Any Store</option>
        <option value="Arnotts">Arnotts</option>
        <option value="BrownThomas">BrownThomas</option>
        <option value="Dundrum">Dundrum</option>
    </select>
    <select id="category" onchange="selectData();">
        <option value="">Any Category</option>
        <option value="Mens Wear">Mens Wear</option>
        <option value="Shoes">Shoes</option>
        <option value="Womens Wear">Womens Wear</option>
        <option value="Cosmetics">Cosmetics</option>
    </select>
    
    <div classs="brand-holder">
        <div class="brand-column">
            <h3>0-9</h3>
            <ul class="brand-list">
                <li data-alpha="0" data-store="Arnotts,BrownThomas" data-category="Mens Wear, Shoes">Brand name <i>[store:Arnotts,BrownThomas :: category: Mens Wear, Shoes]</i></li>
            </ul>
        </div>
        <div class="brand-column">
            <h3>A</h3>
            <ul class="brand-list">
                <li data-alpha="A" data-store="Arnotts,Dundrum" data-category="Womens Wear, Cosmetics" >A Brand Name <i>[store:Arnotts,Dundrum :: category: Womens Wear, Cosmetics]</i></li>
            </ul>
        </div>
    </div>
    

    CSS

    .hidden {
        display:none;
    }
    

    Javascript

    function selectData() {
        var alpha = document.getElementById('alpha').value;
        var store = document.getElementById('store').value;
        var category = document.getElementById('category').value;
        var i;
        var j;
        var flag;
    
        items = document.getElementsByTagName("li");
    
        // Hide/show items
        for(i = 0; i < items.length; i++) {
            a = items[i].getAttribute('data-alpha');
            s = items[i].getAttribute('data-store').split(",");
            c = items[i].getAttribute('data-category').split(",");
    
            // To be safe
            for(j = 0; j < s.length; j++) s[j] = s[j].trim();
            for(j = 0; j < c.length; j++) c[j] = c[j].trim();
    
            if((alpha == "" || a == alpha) && (store == "" || s.indexOf(store) != -1) && (category == "" | c.indexOf(category) != -1)) {
                items[i].classList.remove("hidden");
            } else {
                items[i].classList.add("hidden");
            }
        }
    
        // Clear empty groups
        groups = document.getElementsByClassName("brand-list");
    
        for(i = 0; i < groups.length; i++) {
            flag = true;
    
            for(j = 0; j < groups[i].childNodes.length; j++) {
                node = groups[i].childNodes[j];
    
                if(node.nodeName.trim() == "LI" && (node.className == "" || node.className.indexOf('hidden') == -1)) {
                    flag = false;
                    break;
                }
            }
    
            // Remove the whole div
            if (flag) {
                groups[i].parentNode.classList.add("hidden");
            } else {
                groups[i].parentNode.classList.remove("hidden");
            }
        }
    }
    

    jQuery (instead of Javascript)

    $(document).ready(function() {
        function selectData() {
            var alpha = $("#alpha").val();
            var store = $("#store").val();
            var category = $("#category").val();
            var j;
    
            // Hide items
            $("li").each(function() {
                a = $(this).attr('data-alpha');
                s = $(this).attr('data-store').split(",");
                c = $(this).attr('data-category').split(",");
    
                // To be safe
                for(j = 0; j < s.length; j++) s[j] = s[j].trim();
                for(j = 0; j < c.length; j++) c[j] = c[j].trim();
    
                if((alpha == "" || a == alpha) && (store == "" || s.indexOf(store) != -1) && (category == "" | c.indexOf(category) != -1)) {
                    $(this).removeClass('hidden');
                } else {
                    $(this).addClass('hidden');
                }
            });
    
            // Hide empty sections
            $(".brand-list").each(function() {
                if($(this).children("li").not(".hidden").length > 0) {
                    $(this).parent().removeClass("hidden");
                } else {
                    $(this).parent().addClass("hidden");
                }
            });
        }
    
        $("#alpha").on("change", selectData);
        $("#store").on("change", selectData);
        $("#category").on("change", selectData);
    });
    

    Solution: 2 Live Demo

    HTML

    <select id="alpha"">
        <option value="">Choose A-Z</option>
        <option value="0">0-9</option>
        <option value="A">A</option>
        <option value="B">B</option>
        <option value="C">C</option>
        <option value="D">D</option>
    </select>
    <select id="store"">
        <option value="">Any Store</option>
        <option value="Arnotts">Arnotts</option>
        <option value="BrownThomas">BrownThomas</option>
        <option value="Dundrum">Dundrum</option>
    </select>
    <select id="category">
        <option value="">Any Category</option>
        <option value="Beauty">Beauty</option>
        <option value="Shoes">Shoes</option>
        <option value="Womens Wear">Womens Wear</option>
        <option value="Cosmetics">Cosmetics</option>
    </select>
    
    <div classs="brand-holder">
        <div class="brand-column">
            <h3>0-9</h3>
            <ul class="brand-list">
                <li data-alpha="0" data-store="Arnotts,BrownThomas" data-arnotts-category="Mens Wear, Cosmetics" data-dundrum-category="" data-brownthomas-category="Beauty" >1. Brand Name <i>[data-store="Arnotts,BrownThomas" data-arnotts-category="Mens Wear, Cosmetics" data-dundrum-category="" data-brownthomas-category="Beauty"]</i></li>
            </ul>
        </div>
        <div class="brand-column">
            <h3>A</h3>
            <ul class="brand-list">
                <li data-alpha="A" data-store="Arnotts,Dundrum,BrownThomas" data-arnotts-category="Womens Wear, Cosmetics" data-dundrum-category="Womens Wear" data-brownthomas-category="Beauty" >A Brand Name <i>[data-store="Arnotts,Dundrum,BrownThomas" data-arnotts-category="Womens Wear, Cosmetics" data-dundrum-category="Womens Wear" data-brownthomas-category="Beauty"]</i></li>
            </ul>
        </div>
    </div>
    

    CSS

    .hidden {
        display:none;
    }
    

    jQuery

    $(document).ready(function() {
        function selectData() {
            var alpha = $("#alpha").val();
            var store = $("#store").val();
            var category = $("#category").val();
            var j;
    
            // Hide items
            $("li").each(function() {
                a = $(this).attr('data-alpha');
                s = $(this).attr('data-store').split(",");
    
                if (store == "") {
                    c = ($(this).attr('data-arnotts-category') + "," + $(this).attr('data-dundrum-category') + "," + $(this).attr('data-brownThomas-category')).split(",");
                } else {
                    c = $(this).attr('data-' + store.toLowerCase() + '-category');
                }
    
                // To be safe
                for(j = 0; j < s.length; j++) s[j] = s[j].trim();
                for(j = 0; j < c.length; j++) c[j] = c[j].trim();
    
                if((alpha == "" || a == alpha) && (store == "" || s.indexOf(store) != -1) && (category == "" | c.indexOf(category) != -1)) {
                    $(this).removeClass('hidden');
                } else {
                    $(this).addClass('hidden');
                }
            });
    
            // Hide empty sections
            $(".brand-list").each(function() {
                if($(this).children("li").not(".hidden").length > 0) {
                    $(this).parent().removeClass("hidden");
                } else {
                    $(this).parent().addClass("hidden");
                }
            });
        }
    
        $("#alpha").on("change", selectData);
        $("#store").on("change", selectData);
        $("#category").on("change", selectData);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I have is something similar to this: //method being called by thread pool
I need to implement a call to a method that I have in my
I have an iPhone application and I need to implement the following method: +(UITextView
This is a question about how to implement the equals method when I need
In addition to this quite old post , I need something that will use
I need to design and implement something similar to what Martin Fowler calls the
The short question: Does Castle Windsor have something similar to Spring.Net's Lookup Method Injection
I would like to implement something similar to a c# delegate method in PHP.
I need to implement a method that takes an address split up into individual
I need to implement a method for non-linear interpolation between values, ease-in, ease-out, general

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.