<style>
div {
border: solid 1px;
width: 50px;
height: 50px;
}
</style>
<div id="div" style="position: absolute; top: 0px; left: 0px; border: none; ">
<button>click</button>
<div>div1</div>
<div>div2</div>
<div>div3</div>
</div>
<script>
window.onload = function () {
var div = document.getElementById('div');
var but = div.children[0];
but.onclick = function () {
var count = 200;
var step = 6;
var coof = 1;
var goLeft = function (elem) {
elem.style.left = parseInt(elem.style.left) + step;
}
for (var i = 0; i < count; i += step) {
setTimeout(function () {goLeft(div)}, i*coof);
}
}
}
</script>