Bug Tracker

Opened 10 years ago

Closed 10 years ago

#5928 closed bug (fixed)

Global mousemove ceased to function

Reported by: Znarkus Owned by:
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: mousemove Cc:
Blocked by: Blocking:

Description

The $().mousemove event never fires. The docs for this is not working on three different computers PC/Mac, Firefox/Safari.

http://docs.jquery.com/Tutorials:Mouse_Position

Change History (6)

comment:1 Changed 10 years ago by Znarkus

Reproduction code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>Mouse move test</title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
	<script type="text/javascript">
		$(function(){
			$('body').html('Move mouse!');
			
			$().mousemove(function(e){
				$('body').html(e.pageX + ', ' + e.pageY);
			});
		});
	</script>
</head>
<body></body>
</html>

comment:2 Changed 10 years ago by Znarkus

The same code works perfectly with jQuery 1.3.2

comment:3 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

Use $(document).mousemove() per the 1.4 release notes.

comment:4 Changed 10 years ago by Znarkus

Resolution: invalid
Status: closedreopened

Documentation is still not working; it's using the old syntax. Confusion!

<script type="text/javascript">
jQuery(document).ready(function(){
   $().mousemove(function(e){
      $('#status').html(e.pageX +', '+ e.pageY);
   }); 
})
</script>

comment:5 Changed 10 years ago by miketaylr

It took me about 5 minutes to figure out--but what he's saying is that on this page,

http://docs.jquery.com/Tutorials:Mouse_Position

it's still using the old $().movemove. Since that's still on the wiki--I've updated it to $(document).

comment:6 Changed 10 years ago by john

Component: unfiledevent
Resolution: fixed
Status: reopenedclosed

Thanks Mike - reclosing.

Note: See TracTickets for help on using tickets.