Home › Forums › JavaScript › Hover event, but not on touch/mobile devices › Reply To: Hover event, but not on touch/mobile devices
November 25, 2019 at 7:56 am
#299535
Participant
from @PaulOB over at sitepoint
if (!(“ontouchstart” in document.documentElement)) {
$(“#test-parent”).hover(function() {
$(“#test-child”).fadeToggle();
});
}