 Code: - <script>
- var TopZ = 101;
- function SetZ(WinID){
- TopZ++
- get(WinID,'id').style.zIndex = TopZ;
- }
- </script>
-
- <div id = 'x' onclick = "SetZ('x');" style = 'position: relative; top: 15px; left: 10px; padding: 50px; border: 1px solid #000000; background: #800000; color: #FFFFFF; width: 200px;'>
- RAWR!
- </div>
- <div id = 'y' onclick = "SetZ('y');" style = 'position: relative; top: -15px; left: 20px; padding: 50px; border: 1px solid #000000; background: #800000; color: #FFFFFF; width: 200px;'>
- RAWR2!
- </div>
- <div id = 'z' onclick = "SetZ('z');" style = 'position: relative; top: -40px; left: 30px; padding: 50px; border: 1px solid #000000; background: #800000; color: #FFFFFF; width: 200px;'>
- RAWR3!
- </div>
- <div id = '1' onclick = "SetZ('1');" style = 'position: relative; top: -45px; left: 40px; padding: 50px; border: 1px solid #000000; background: #800000; color: #FFFFFF; width: 200px;'>
- RAWR4!
- </div>
The JS to change the Z-Index is x.style.zIndex = 'number'; |