I'm not sure why it isn't working for you. Once I add the parseInt it works for me.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Move Div</title>
<script type="text/javascript">
/* <![CDATA[ */
function moveIt() {
var valueLeft = parseInt(document.getElementById("adiv").style.left);
document.getElementById("adiv").style.left = valueLeft + 100 + "px";
}
/* ]]> */
</script>
</head>
<body>
<div>
<button onclick="moveIt();">Do it</button>
<br />
<div id="adiv" style="position:fixed; left:100px; background-color:yellow;">Hi</div>
</div>
</body>
</html>
As a side note that doesn't seem to cause any problem in my test, but I just noticed that in your code on these lines
Code:
valueLeft = document.getElementById("scrollingDiv"). style.left;
document.getElementById("scrollingDiv"). style.left = valueLeft + 1 + "px";
You have a space before style and after the period. I don't know if it can cause a compatibility problem somewhere down the line.
david_kw