-1

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.

georgej
  • 2,401
  • 4
  • 17
  • 43

2 Answers2

1
$('#your-element').off('scroll');
Tyler Biscoe
  • 2,207
  • 2
  • 18
  • 33
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

Nate Beers
  • 1,277
  • 1
  • 12
  • 21