How can I unbind all the functions that I previously added to the scroll
event? I want to do this without using the names of the functions.
Asked
Active
Viewed 119 times
-1
![](../../users/profiles/6728336.webp)
georgej
- 2,401
- 4
- 17
- 43
2 Answers
1
$('#your-element').off('scroll');
![](../../users/profiles/681290.webp)
Tyler Biscoe
- 2,207
- 2
- 18
- 33
-
Ahh, thanks, @DaniP!! Updated. – Tyler Biscoe Mar 27 '17 at 15:31
-
thanks for the answer, unfortunately that did not unbind any events from the scroll event for me – georgej Mar 27 '17 at 15:54
1
Use this to unbind everything from scroll event:
$(window).unbind("scroll");
Or substitute specific elements for window
if you don't want to unbind everything
![](../../users/profiles/3708505.webp)
Nate Beers
- 1,277
- 1
- 12
- 21