I use jQuery and draggable from jqueryUI. When I update jQuery from 1.6 to 1.7 clientX and pageX attributes disappeared from event variable. Here is an example:
http://jsbin.com/ezulas/7/edit
If in given example jQuery version is changed to 1.6.4 - it starts working. With latest release - both clientX/Y and pageX/Y are not working. I discovered I can use e=e.originalEvent - but that doesn't seems to be the proper solution.
In the jQuery docs for Event Object it says
Which seems to fit what you are saying. In your situation your event does not have pageX and pageY defined.
I had the same problem and was searching similar threads for quite a while. It is now fairly late, but I hope this will still save some happy coders from despair. I checked the jQuery UI Touch Punch file that I was also using in my project and found how it refers to the x/y position. This is what eventually worked for me:
For reference, here a list of all jQuery files I am using:
Source: http://blog.jquery.com/2011/11/03/jquery-1-7-released/
When you
console.log(e);
inside yourdragstop
event handler you can see that all thex
/y
coordinate data is missing in jQuery 1.7; but it can be accessed inevent.originalEvent
.UPDATE
If you look around in the
event
object you can findpageX
/pageY
in theorigionalEvent
property:Here is an updated version of your jsbin: http://jsbin.com/ezulas/13/edit