Move scroll functionality into an object and replace string single quotes with double quotes.