-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
  • 3,041
  • 6
  • 24
  • 46

2 Answers2

1
$('#your-element').off('scroll');
Tyler Biscoe
  • 2,322
  • 3
  • 20
  • 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,355
  • 2
  • 13
  • 22