News:

To still receiving newsletters from us please subscribe to our Newsletters:
http://tech.groups.yahoo.com/group/developers-Heaven/

Main Menu

How to tracking and capture mouse position using jQuery

Started by admin, July 04, 2010, 07:02:45 AM

Previous topic - Next topic

admin

<html>
How to tracking and capture mouse position using jQuery?

If you want to know the mouse pointer position and use in mouse click or move events you can use the following code:

<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
   $(document).mousemove(function(e){
      $('#status').html(e.pageX +', '+ e.pageY);
   });
})
</script>
<body>
<h2 id="status">
0, 0
</h2>
</body>
</html>