What is the difference between
event.originalEvent.dataTransfer.files
and
event.dataTransfer.files
???
Because in drag and drop , second code does not work and it is undefined and i had to use first code because it works !
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.
jQuery does not pass the browser event object to you, it passes the jQuery event object. You can access the original untouched event object by the
.originalEventproperty in the jQuery event object. Then you can proceed as normal.So in code:
jQuery event model:
W3C event model: