cmpolis / scrollIt.js

A jQuery plugin that makes it easy to create paginated, feature vertically scrolling pages.
http://bytemuse.com/scrollIt.js
Other
539 stars 148 forks source link

Question: on() method binded twice? #11

Closed bbbiiiaaa closed 10 years ago

bbbiiiaaa commented 11 years ago

Hi, Your plugin works great. I have one question, though. In this line you bind the watchActive handler to the scroll event and you use the on() method again. Could you explain me why?

$(window).on('scroll',watchActive).on('scroll')
cmpolis commented 10 years ago

Great question - it looks like someone incorrectly refactored the binding from:

$(window).scroll(watchActive).scroll();