When using for events for internet explorer we are currently using statements like this to access or change values:
window.event.cancelBubble = true;
clickX = window.event.screenX;
I was wondering how to do this cross browser or using JQuery?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you provide a callback to a jquery binding function, it always take as first parameter a event that you should use, even on IE.
Don’t use
window.eventif you’re using jQuery.Note that this is a jQuery wrapped event. For some uses you may need the
originalEventproperty of the event you get. Here’s how you can get both in a callback :