Add "open" class to another template

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