Basically, I had a CSS button with :active
written, but every time I click on the buttons on my phone, there is a delay before switching to the active phase.
CSS:
.btn {...} .btn:active{...}
Then I tried using "touchstart"
and "touchend"
to add and remove my active class, but there are still delays between normal -> touchstart and touchstart -> touchend.
Jquery:
$(".btn").on("touchstart", function(){
$(this).addClass("touched");
}).on("touchend",function(){
$(this).removeClass("touched");
})
How to remove my delay?