Hi, I would like to write a script that continuously changes the left margin of a div while the user hovers over another div. onmouseover would start changing the margin and onmouseout would stop it. The margin should change by subtracting 10px to the current margin so that it would continuously decrease. I'm sure it's something simple that I'm missing. The value for the left margin is in document.getElementById('div').style.marginLeft.
Ok, this changes the left margin to -10px onmouseover and to 0px onmouseout. That works fine, but what I'm looking for is a way to continuously subtract 10px from the left margin while the mouse is over the other div. In other words, have it go from 0px to -10px to -20px to -30px... and then stay at -30px when the mouse is moved out of the div. Thanks for the quick reply.
Bookmarks