All children open at when parent is clicked.

All children open at when parent is clicked.

I'm creating a menu using jQuery (and HTML generated from Wordpress) which acts like a regular accordion mobile menu. I'd like for all list elements to be clickable, and on tabs which have children, I'd like to put an arrow next to it open the dropdown when clicked. This way I can have the main list element's text serve as a button to open that particular page. 

    

I've been developing my own script. I've worked out some of the issues and I have a working menu, but my issue is making the sub-submenus not open when I click open a submenu. Everything under the parent I select opens. I made a jsfiddle for it: jsfiddle.net/xpvt214o/120082.

I don't have a ton of control over the HTML because I'm using the menus generated in Wordpress, whose HTML comes out to be something like I've included in my jsFiddle.

Can you suggest to me how to resolve this issue with the submenus opening when they shouldn't?

Thanks!