Issue with accordion menu created with custom code

There is an existing thread for this topic.