Jquery .click() or on("click" )? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Jquery .click() or on("click" )?

Hello everyone. I am a little bit confused with this. What is the difference between .click and on("click"). I have seen both of them used in many cases. Is one of them a better practice or are they the same? Thank you in advance.

6th Sep 2018, 10:34 AM
Andrew Siachos
Andrew Siachos - avatar
1 Answer
+ 2
.click() doesn’t work with appended elements.
6th Sep 2018, 10:43 AM
Toni Isotalo
Toni Isotalo - avatar