Does jQuery automatically remove attached even handlers from objects when I remove them?
-
06-07-2019 - |
Question
Well my interest is whether jQuery does remove attached event handlers from the DOM object and all it's descendants (if they got some event handlers attached as well), if I just remove that DOM object with jQuery('.selector').remove()
?
Solution
jQuery docs: "Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data."
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow