I have posted alot lately my self, so decided to display all unanswered posts and try to answer as many as possible and found your post
Can you please give more information on what you want to do.
Are we talking about for example color the active menu choice or anything like that?
Cause if that is the case I would recommend to handle this entirerly by CSS as that requires less programming logic and that also makes it easier with future updates etc.
I usually allways build my entire menu functions purely on CSS
But maby I missunderstood what you wanted to intially do so just give me more information and I will try my best to answer your question