Is there a way to get mouse coordinates when the window is unloaded? I’ve tried the following (in firefox) but it doesn’t seem to let me pull much from e apart from type which returns unload.
$(window).unload(function(e) {
var evt=window.event || e;
alert(evt.pageX); // or screenX or clientX or whatever
});
In the
unloadevent, there isn’t mouse coordinates included. (http://jsfiddle.net/DerekL/wtp9X/)But if you want a hacky solution, you can continuously track user’s mouse position and use the last one in
unload.http://jsfiddle.net/DerekL/gYEhF/