Changed from .scroll to .on method and added a namespace