Moving setting of opacity to scroll event