I am trying to make a mouse effect with a gif file and I found the following code:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(function(){
$("body").mousemove(
function(e){
$("<img src='http://www.favicon.cc/logo3d/618187.png' />")
.css({
'position':'absolute',
'top':e.pageY+5,
'left':e.pageX+-15,
'width':'30px',
'height':'30px'
}).prependTo( $(document.body))
.fadeOut(100, 'linear', function(){
$(this).remove();
});
});
});
</script>
</body>
When I ran the html file I cannot see anything, for it, I think I am making a mistake in the code, Could anybody help me to fix?
htmlinstead ofbody: jsfiddle.net/fNZeX<body>tag, and your closing</head>.