M
M
MeMoJlor2020-08-21 20:09:43
JavaScript
MeMoJlor, 2020-08-21 20:09:43

Is it possible to disable the script or make a separate version of the page for Safari?

There are onclick events that don't work correctly on Safari:

<a href="#" onclick="url=this.href;setTimeout('location.href=url',600);this.href='javascript:void(0)';">cсылка</a>

when fixing for Safari, it stops working on PC:
<a href="#" onclick="url=this.href; setTimeout('location.href='+url, 600); return false;">cсылка</a>


I want to disable the script or make a separate page for Safari. Are there any ways to implement? I did not find any information on the Internet, if you know an article on the topic, please send a link. Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2020-08-21
@MeMoJlor

You can not try to break the link, but use span, and accordingly not try to override the behavior.
Styling can be added separately. The URL for the transition can be set via data-attributes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question