Answer the question
In order to leave comments, you need to log in
How to implement a type of hover effect on click on touch screens?
Currently on mobile, when clicked, it immediately goes to the link.
here is the site geekend.ru I want to make it so that I poked once a hint came out, poked the second one followed the link (namely on touch screens)
Answer the question
In order to leave comments, you need to log in
It's easy, put a condition in the javascript that if there is such a class, then there is a transition, if this class does not exist, then add it)
function foo(e)
if (el.classList.contains('hover')) {
} else {
e .preventDefault
el.classList.add('hover')
}
something like this can be done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question