I have a bunch of panels for different categories that change the background image when hovered over, display some introductory text, and lead to a URL when clicked. However, on mobile devices, you need to tap the panel twice to activate the URL.
What I've attempted:
$(".ty-subcategories__item").on("touchend", function(event) {
window.location.href = $(this).find("a").attr("href");
});
This solution works, but if you're scrolling down the phone (particularly an iPhone) and swipe on the screen, it will randomly navigate to a page once you release your finger from scrolling:
Here is the snippet of JavaScript I'm using to show the hidden text on hover:
$('.ty-subcategories__item').hover(
function() {
$(this).find('.logo-desc').fadeIn(1000);
},
function() {
$(this).find('.logo-desc').fadeOut(1000);
}
);
See the working example below: