Is there a way to extract the position x value of my div and store it in a variable? How do we then iterate over it within a for loop?
<div id="object"></div>
<style>
#object{
position:absolute;
width:10px;
height:10px;
background:#ff8800;
}
</style>
<script>
function play(){
// Can someone help me figure out how to capture the div's position as a variable and use it in a for loop?
// I'm stuck on how to modify its position within the loop
for(){
}
// Any ideas on what to do next would be greatly appreciated
}
</script>