Skip to content

Instantly share code, notes, and snippets.

@EzeRangel
Last active February 21, 2017 00:45
Show Gist options
  • Save EzeRangel/69052086d659403e41d8 to your computer and use it in GitHub Desktop.
Save EzeRangel/69052086d659403e41d8 to your computer and use it in GitHub Desktop.
Simulate hover effect on click event
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
$(".hover-affected-element").click(function(){
//we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event (¿?)
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment