Functions in JavaScript/jQuery | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Functions in JavaScript/jQuery

Suppose we attached any function like keypress(in jQuery) or addEventListener(in JavaScript) then does they get permanently attached to that element and we do not need to call them every time. PS: It may should funny question but I am new to JS and it appears very different from Python.

15th Sep 2019, 9:25 PM
harshit
harshit - avatar
4 Answers
+ 2
It's best not to rely on jQuery. Complete JavaScript and know it very well that's the best. http://youmightnotneedjquery.com So learn JavaScript very well. It's just my opinions
16th Sep 2019, 4:25 AM
Qudusayo
Qudusayo - avatar
+ 2
It's best not to rely on jQuery. Complete JavaScript and know it very well that's the best. http://youmightnotneedjquery.com So learn JavaScript very well. It's just my opinions
16th Sep 2019, 4:25 AM
Qudusayo
Qudusayo - avatar
+ 2
Yes setting any event is always attached to the element
16th Sep 2019, 4:25 AM
Qudusayo
Qudusayo - avatar
0
Should only have to declare it once
15th Sep 2019, 9:47 PM
Anthony Johnson
Anthony Johnson - avatar