title: How to randomly move an image around a table in Javascript
body: <p>I have an image in the cell of a table and I want it to move from one cell to another at random. I was planning on using the setInterval and Math.random() to move the image around randomly every two seconds but I cannot get the image to move around at all</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;style&gt;
          tr { width: 300px; height: 100px }
          td { width: 100px; height: 100px }
          img { width: 100px; height: 100px }
      &lt;/style&gt;
          &lt;script&gt; 
              function moveImgRandomly()
              {
  
  
              }
          &lt;/script&gt;
  &lt;/head&gt;
  &lt;body bgcolor="lightblue"&gt;
      &lt;table border=1 id="myTable"&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;img src="http://graemehobbs93.files.wordpress.com/2012/01/ape-1.jpg" id="img"&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is what I have so far that works. I have been trying for hours to get the image to move and it will not. I also cannot use jQuery.</p>