Add "open" class to another template

I am using Go Templates and I try to use a main menu and several sub menus. The submenus are attached to the window.

image

By attaching the sub menu to the window I am not able to send an “open” from another window.

image

to the other window as the class is refreshed when the new window open.

image

The class “open” will be reset in the new window.

Is there any way to send a parameter via Javascript to another template. The “global variable” belongs only to the current window.

Any tip or complete rethinking is welcome!

What do you mean by this?

Go templates have nothing to do with JavaScript which runs in the browser.

I know no other way to “open” a < div > than by Javascript and CSS. Is there another way using Go?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.