Using javaScript to set style zIndex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Claus Mygind
    Contributor
    • Mar 2008
    • 571

    Using javaScript to set style zIndex

    How come I can set this style element

    Code:
    document.getElementById("popTime").style.left =  "0px";
    
    but not this
    
    document.getElementById("freqJobDiv").style.zIndex = "20";
    I have two nested division on the screen. I want to use a mouseover to bring the back division to the front. It seems I can get all the style properties to work except for zindex

    However when I do it in the HTML it works fine like this
    Code:
    	
    <div
      id="freqJobDiv"
      onmouseout="freqJobDiv.style.zIndex=0;"
      onmouseover="freqJobDiv.style.zIndex = 20;"
    >
  • Claus Mygind
    Contributor
    • Mar 2008
    • 571

    #2
    Never mind now it seems to work. Hmm!

    Comment

    Working...