I am in the process of creating a drill-down menu for my website. The idea is that when a user clicks on a category, it will display the subcategories belonging to that specific category. This can extend into multiple levels of subcategories. I have successfully written an SQL query that produces the exact output I desire. However, my challenge lies in determining how to present this menu to the end user. Ideally, I would like only the clicked category to expand while keeping the rest collapsed.
Query Output:
1 IPTV
2 Jadoo Tv
3 Shava Tv
4 Jalva Tv
5 Programming
6 Microsoft
7 Asp.Net
8 PHP
Therefore, by default, IPTV & Programming should be visible as they are parent categories. When clicking on IPTV, it should reveal its children, with the possibility of endless levels of nesting.
My initial thought was to load the query output onto the webpage and manipulate the menu navigation using CSS and JavaScript.
Do any of you have suggestions or ideas on how to approach this?