Prevent simultaneous movements; seperate js and css from html