I was wondering if there is a way, or a plugin, to help change the z-index after the click of a button?
My example is that I want to be able to have an uploaded picture with a transparent element. Then a user uploads a photo on top of it and that on save, the orders are flipped?
Thanks for the reply. That actually helps me out with another problem… when I have tried to set a default image (I use the static image) but then can’t seem to have a dynamic image as well.
For the issue that I was actually creating this topic for. I don’t want to replace one with another, I will be wanting to keep them both, just have one below the other as the image on the software will have a transparent element in it. So users will upload their image on the top and then it will swap orders so the transparent element is on top. Though I want to try and find a way to automatically change the z-index,
The code would look something like Z-index: -1; for the image on the bottom, and Z-index: 0; for the image on top. You could also look into css documentation to do more with it.
Give your bubble element an attribute ID, for example my_element
Then using the “Run Javascript” action you can do document.getElementById('my_element').style.zIndex = 10;
That just sets the z-index to 10 but you can change that to any number.
You can add an hidden element on image and as soon as the user uploaded an image a condition makes this element visible. So that no needed to play with the css.