UL LI Menu select parent branch

UL LI Menu select parent branch

I got a UL LI menu

and it's not working right.

the problem is: when i want to open new branch the parent is closing.
the code is in the attacment...