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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="stylespacewars.css" />
<script src="jsspacewars.js"></script>
<script src="jquery.js"></script>
<img class="Ship" src="Ally ship.gif" alt="HTML5 Icon" >
<img class="EnemieBasic" src="Basic enemie.gif" alt="HTML5 Icon" >
<img class="Core" src="Corelevel1.gif" alt="HTML5 Icon" >
<img class="Shot" src="Shot.gif" alt="HTML5 Icon" >
</head>
<body>
</body>
</html>
Then i have another part of the code in css
html, body {
width: 100%;
height: 100%;
background-color: black; }
IMG.Core {
display: block;
margin-left: auto;
margin-right: auto }
IMG.Ship {
position:absolute;}
Then the final part is in Javascript
$(document).mousemove(function(e){
$("Ship").css({left:e.pageX, top:e.pageY});
});
This does not allow the image ship to follow the mouse pointer can anyone help correct this please.