Prevent location change when links are clicked