hello,
my question is here:
in javascript, does "the movement of a div onto another div" trigger onmouseover?
html codes are here:
here are js functions
as you see there are two function. one function (move) move the div to right, other function(movetotoldplace) move the div old place, to left. the matter is, div can not go to last left pixel. moving div can not move to last pixel passing through under other div(fixed)
i tried to see whether the functions work on their own. they are working if i do not use them together.
i am doing these for a horizontal slowly openning menu. what should i do to fix the problem?
thanks
my question is here:
in javascript, does "the movement of a div onto another div" trigger onmouseover?
html codes are here:
Code:
<body>
<div id="moving" style="position:absolute;display:none">
vcbvbcv
</div>
<div id="fixed" style="position:absolute;" onmouseover="move('asil')" onmouseout="movetooldplace('asil')">
mouse</div>
</body>
here are js functions
Code:
function move(id){
document.getElementById(id).style.display="block";
if(document.getElementById(id).offsetLeft<200){
document.getElementById(id).style.left=document.getElementById(id).offsetLeft+10;
setInterval(function(){move(id);},25);
}
}
function movetooldplace(id){
if(document.getElementById(id).offsetLeft>0){
var sayi=document.getElementById(id).offsetLeft;
document.getElementById(id).style.left=sayi-10;
setInterval(function(){movetooldplace(id);},10);
}
if(document.getElementById(id).offsetLeft==0){
document.getElementById(id).style.display="none";
}
}
i tried to see whether the functions work on their own. they are working if i do not use them together.
i am doing these for a horizontal slowly openning menu. what should i do to fix the problem?
thanks