A
A
Alexander2016-09-01 08:04:42
iPhone
Alexander, 2016-09-01 08:04:42

How to remove double click on a link on ios (iphone)?

The bottom line is that links have a hover set via css. The first time you click on the iphone on these links, hover is triggered, and on the second click, you follow the link. How to make the hover not be considered as a separate click, but immediately follow the link?
Preferably without JS

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Sazanov, 2016-09-01
@sme_ab

Of course, you can remove hovers on different device sizes by media queries, but not always a narrow screen means the presence of a wheelbarrow and vice versa.
I recommend using the https://modernizr.com
library . You don't have to write anything in js yourself.
Among other goodies, the plugin, depending on the device on which the site is open, prescribes touch and no-touch classes in html.
Then it is enough just to set styles for these classes, for example

html.no-touch a:hover {
    color: #ccc
}

N
Nikita Shchypylov, 2016-09-01
@Nikulio

Kill hover on devices that do not have the ability to "hover". For example, after 1024 remove hovers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question