Having an issue with interactive buttons on my website. Whenever I try to hover over a button styled with CSS, it requires a double click. The first click activates the hover effect and the second one actually redirects.
Is there a way to skip the hover effect and directly redirect on the first click?
I came across this code snippet but it seems overly sensitive - triggering the link even if scrolling while clicking:
var device = navigator.userAgent.toLowerCase();
var ios = device.match(/(iphone|ipod|ipad)/)
if (ios) {
$('a').on('click touchend', function(e) {
var el = $(this);
var link = el.attr('href');
window.location = link;
});
}