开发者

Get the raw event from jQuery

开发者 https://www.devze.com 2023-03-03 12:57 出处:网络
Is it possible to have access to the original, raw, non-normalized event from the function passed in to bind/live in jQuery? If yes, h开发者_开发知识库ow?You can use the originalEvent property of the

Is it possible to have access to the original, raw, non-normalized event from the function passed in to bind/live in jQuery? If yes, h开发者_开发知识库ow?


You can use the originalEvent property of the Event object:

$(selector).bind("click", function(e) {
    var originalEvent = e.originalEvent;
    // ...
});
0

精彩评论

暂无评论...
验证码 换一张
取 消