Hi, I need you !!! | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Hi, I need you !!!

Someone know how to remove a envent listener which use an anonimous function ? thanks you ;)

1st Mar 2019, 4:28 PM
Alexis
Alexis - avatar
2 ответов
+ 3
Looks like it is not possible, you can only remove named listeners.
1st Mar 2019, 5:21 PM
nobody
+ 1
Well, if you use jQuery you can use the .on function to register an anonymous function for let's say 'click'. and you can remove the function with .off for click without having to know the function.
2nd Mar 2019, 12:41 PM
nobody