Fix JavaScript for scroll effects.