alykins
06-15-2011, 04:57 AM
first- i wanted to say (for all those who see it before the Mods remove it) how stupid does a bot have to be to set its spam to be resolved at OP? lol
so now my question...
I have two divs with some styling.
#show{CSS code}
#menuDet1{CSS code and visibility:hidden;}
I then had in html
<div id="show" onmouseover="changevis(1)"></div>
<div id="me1"></div>
and then a function
function changevis(index){
acMenuDet="me" + index;
document.getElementById(acMenuDet).visibility="visible";
}
a colleague of mine helped me "debug" this until it worked and we came up with
function details_visible(index) {
var acMenuDet = "menuDet" + index;
document.getElementById(acMenuDet).style.visibility = "visible";
;
}
function details_hidden(index) {
var acMenuDet = "menuDet" + index;
document.getElementById(acMenuDet).style.visibility = "hidden";
;
}
Note: also changed code in div to
<div id="show" onmouseover="details_visible(1)" onmouseout="details_hidden(1)"> Hover over me</div>
<div id="menuDet1" style="visibility: hidden;" >Plesam Plesam Plesam Plesam Plesam</div>
I do not see off the bat what I was doing wrong- anyone else see what I did incorrectly?
so now my question...
I have two divs with some styling.
#show{CSS code}
#menuDet1{CSS code and visibility:hidden;}
I then had in html
<div id="show" onmouseover="changevis(1)"></div>
<div id="me1"></div>
and then a function
function changevis(index){
acMenuDet="me" + index;
document.getElementById(acMenuDet).visibility="visible";
}
a colleague of mine helped me "debug" this until it worked and we came up with
function details_visible(index) {
var acMenuDet = "menuDet" + index;
document.getElementById(acMenuDet).style.visibility = "visible";
;
}
function details_hidden(index) {
var acMenuDet = "menuDet" + index;
document.getElementById(acMenuDet).style.visibility = "hidden";
;
}
Note: also changed code in div to
<div id="show" onmouseover="details_visible(1)" onmouseout="details_hidden(1)"> Hover over me</div>
<div id="menuDet1" style="visibility: hidden;" >Plesam Plesam Plesam Plesam Plesam</div>
I do not see off the bat what I was doing wrong- anyone else see what I did incorrectly?