Hello there! I’m curious if there is a way to toggle what background image to show or not.
I get it working with getElementById but can’t make it happen with getElementsByClassName.
I’m curious if it’s even possible to change the image on a class.
It is very important that it is the class and not the div, since the flagicon will be displayed on several scenes and needs to be the same (toggled or not) to the new scene. I don’t want to do this with timelines, button press in element inspector or anything like that. It needs to be made with pure javascript or jquery to make it work with the rest of the code that is not added in this example.
If there is no way of doing it I will make an external css for this and add remove the class, feels like it should be possible without css though.
Anyway, here is the example:
toggleflagnotworking.hype.zip (78.1 KB)