Display div of linked div at top when link is clicked
Hi, this is a bit complicated, so I will try and explain it.
I have multiple div boxes in the exact some position.(As if frames of a TV)
Different div boxes are displayed depending on the z-index value.(If there are any other ways of achieving this please let me know)
In the div boxes are in page links that go to that part of the page.(However, the z-index value still does not change:()
I want the div of the link being clicked to be shown on top when clicked.
If anyone can think of a solution, please let me know.
As a test, I created the following, hopefully it can give you an idea of what I am interested in making. When I tested this, the main issues are that I need to always get the clicked element on top(having zIndex 1000 brings everything to the same zIndex.) I want to achieve this from an anchor tag, but I need to efficiently get the target div.
var testandroid = testandroid + "<div onClick=\"document.getElementById('mobileimage" + i + "').style.zIndex='1000'\">CLICK ME</div>";