Bug Tracker

Modify

Ticket #5928 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Global mousemove ceased to function

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

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

comment:1 Changed 3 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 3 years ago by Znarkus

The same code works perfectly with jQuery 1.3.2

comment:3 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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

comment:4 Changed 3 years ago by Znarkus

  • Status changed from closed to reopened
  • Resolution invalid deleted

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 3 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 3 years ago by john

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Component changed from unfiled to event

Thanks Mike - reclosing.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.