Skip to content

Instantly share code, notes, and snippets.

@markwearing
Created May 2, 2012 13:31
Show Gist options
  • Select an option

  • Save markwearing/2576531 to your computer and use it in GitHub Desktop.

Select an option

Save markwearing/2576531 to your computer and use it in GitHub Desktop.
jQuery fix for old iOS's hover effects
// Wait until the DOM is fully loaded before executing the jQuery
$(document).ready(function($) {
// A little fix for the old ios's out there
// swap out #menu-main-navigation for your own id
$("#menu-main-navigation").on("a", "touchstart touchend", function (e) {
window.location = $(this).attr("href");s
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment