Modify ↓
Ticket #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: | |
| Blocking: | Blocked by: |
Description
The $().mousemove event never fires. The docs for this is not working on three different computers PC/Mac, Firefox/Safari.
Change History
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).
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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>