I am creating a responsive website for both desktop and mobile. I have one issue with a hover and click event that I am not sure how to solve for users on mobile devices.>
if (('ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch))) {
$(".touch")
.bind("touchstart", function() {
$(this)
.addClass("active")
.bind("touchend", function() {
$(this).removeClass("active");
});
})
.bind("touchenter", function() {
$(this)
.addClass("hover")
.bind("touchleave", function() {
$(this).removeClass("hover active");
});
});
}