title: How do you make an image follow your mouse pointer using jQUERY?
body: <p>I have looked up and there are a few threads similar to this but I cant make any of them work for me so I have to ask my code at the moment is.It is different</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;link rel="stylesheet" href="stylespacewars.css" /&gt;
          &lt;script src="jsspacewars.js"&gt;&lt;/script&gt;
          &lt;script src="jquery.js"&gt;&lt;/script&gt;
          &lt;img class="Ship" src="Ally ship.gif" alt="HTML5 Icon" &gt;
          &lt;img class="EnemieBasic" src="Basic enemie.gif" alt="HTML5 Icon" &gt;
          &lt;img class="Core" src="Corelevel1.gif" alt="HTML5 Icon" &gt;
          &lt;img class="Shot" src="Shot.gif" alt="HTML5 Icon" &gt;
      &lt;/head&gt;
      &lt;body&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Then i have another part of the code in css </p>
  
  <pre><code>html, body {
      width: 100%;
      height: 100%;
      background-color: black; }
  
  IMG.Core {
      display: block;
      margin-left: auto;
      margin-right: auto }
  
  IMG.Ship {
      position:absolute;}
  </code></pre>
  
  <p>Then the final part is in Javascript</p>
  
  <pre><code>$(document).mousemove(function(e){
      $("Ship").css({left:e.pageX, top:e.pageY});
  });
  </code></pre>
  
  <p>This does not allow the image ship to follow the mouse pointer can anyone help correct this please.</p>