Jquery event.currentTarget vs this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Jquery event.currentTarget vs this

In jquery what is the difference between event.currentTarget and this when we try to access an element with an event handler? Which one is better to use?

4th Nov 2018, 11:02 PM
Andrew Siachos
Andrew Siachos - avatar
1 Answer
+ 6
This can help: Official Docs https://api.jquery.com/event.currentTarget/ JQuery $(this) vs $(event.currentTarget): https://github.com/airbnb/javascript/issues/389
6th Nov 2018, 2:03 PM
Biel Blue
Biel Blue - avatar