This works very well, but the problem is that the attribute is removed whenever I reload the page or go to a different page. This obviously doesn´t work for a darkmode.
I am surprised nobody asked about this before, but is there a way to save the result of an interaction in a cookie so it will stay applied even when switching pages or reloading?
Uuuuhh… I am at the same point! Hopefully someone can help out!
I found this in another post of the forum, but still dont know how to achieve that…
“When clicking on the element, I save a the language-code in the LocalStorage via the interaction in order to automatically point to the chosen language when visiting the page later.”