Using on scrollEnd instead of on scroll