Skip to content

Instantly share code, notes, and snippets.

@wotupset
Created January 11, 2014 17:26
Show Gist options
  • Save wotupset/8373884 to your computer and use it in GitHub Desktop.
Save wotupset/8373884 to your computer and use it in GitHub Desktop.
jquery mousemove
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Robots" contect="noindex,follow">
<META http-equiv="Content-Script-Type" content="text/javascript">
<META http-equiv="Content-Style-Type" content="text/css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).mousemove(function(event) {
//alert(event.pageX);
document.getElementById("rain").innerHTML =event.pageX+","+event.pageY;
});
</script>
</head>
<body>
<h2 id="rain">0 , 0</h2>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment