Opening As one Closes + Refactoring

Opening As one Closes + Refactoring

Hi, Hope you're all well.

I'm building a menu which opens another menu, total of 3 tiers. At the moment the menu works great - but the panels overlap each other as they open. Ideally i want to open the sub menu which closes the previous one so only one menu is open at a time. I have done a fiddle for you to see.


Please help, many thanks.