http://jsbin.com/ezulas/7/edit
如果在给定的示例中jQuery版本更改为1.6.4 – 它开始工作.使用最新版本 – clientX / Y和pageX / Y都不起作用.我发现我可以使用e = e.originalEvent – 但这似乎不是正确的解决方案.
解决方法
event.layerX and event.layerY: We have removed these non-standard
properties in version 1.7. Although we normally would have gone
through a deprecation notice period for these,Chrome version 16
generates a flood of console warning messages on the page. Because of
this,we decided to remove them immediately. On platforms that still
support these properties,they are available through
event.originalEvent.layerX and event.originalEvent.layerY.
资料来源:http://blog.jquery.com/2011/11/03/jquery-1-7-released/
当你console.log(e);在你的dragstop事件处理程序中,你可以看到jQuery 1.7中缺少所有的x / y坐标数据;但它可以在event.originalEvent中访问.
UPDATE
如果您在事件对象中查看,可以在origionalEvent属性中找到pageX / pageY:
$('#test').html(e.originalEvent.pageX+','+e.originalEvent.pageY);
这是您的jsbin:http://jsbin.com/ezulas/13/edit的更新版本