changes window eventlistener to jquery scroll event