I am trying to build a drill-down menu for my website, where the user will click on a category and it will show the subcategories of that clicked category, there could be n-levels. I am able to write an SQL query which returns the output exactly as I want, but the problem is...I don't want to show the whole menu to the end-user, I would like to open/expand only clicked category.
my Query output is:
1 IPTV
2 Jadoo Tv
3 Shava Tv
4 Java Tv
5 Programming
6 Microsoft
7 Asp.Net
8 PHP
so by default IPTV & Programming Should be displayed, since they are parent, and when I click on IPTV it should open the children of IPTV, like I said there could be n-levels.
I was thinking, I can load the output of query to webpage and then control the menu navigation with css/javascript.
do you guys have any ideas?