![]() |
|
|||||||
| JavaScript Programming Discuss javascript coding. |
| Have A Look At Some Of Our Webmaster Related Sponsors! | |||||
![]() Script Directory |
![]() Shopping Cart |
![]() Market Leverage |
![]() Free Templates |
![]() 3D Guide-characters |
![]() Advertise Here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
New Hunter
Join Date: Dec 2007
Location: United Kingdom - Dorset - Bournemouth
Posts: 87
iTrader: 0 / 0%
Hunter Bux: 5.00
![]() ![]() |
Ok, I am trying to change the z-index of two object onClick. However...it's not working lol.
Could someone please point me in the right direction please? This is what I did: Fist, I coded function which happens onClick. I made it simple after many complecated attempts (I used the alert to show the z-index to see if it worked): Code:
function change()
{
document.getElementById('one').style.zIndex = document.getElementById('two').style.zIndex;
document.getElementById('two').style.zIndex = document.getElementById('one').style.zIndex;
alert("One:\n" + document.getElementById('one').style.zIndex + "\nTwo:\n" + document.getElementById('two').style.zIndex);
}
__________________
<!-- I can type the entire Alphabet in 2.19 seconds --> /* (X/D)Html, Css, Javascript, Ajax, Xml (DTD), PHP, MySQL, E4X */ /* Learning C++ and German */ |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|