2

I have mouseenter event attached for an element which is working fine. for the same event, triggering event manually using jQuery.trigger("mouseenter"). this is calling mouseenter handler. but in the event object, event.pageX and event.pageY are undefined. is there any way to get it?

created a sample - here

4

1 回答 1

1

您可以使用mousemove处理程序来跟踪当前鼠标位置。然后你可以将 x 和 y.trigger()传递给它们,它们将被传递给你的处理程序。

于 2013-08-09T20:34:41.873 回答