Created
July 9, 2012 16:39
-
-
Save ziadoz/3077500 to your computer and use it in GitHub Desktop.
jQuery iOS Safari Fullscreen Links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ensure iOS Safari fullscreen links don't open in external Safari. | |
$(document).ready(function() { | |
if (/(iPhone|iPod|iPad)/i.test(navigator.userAgent)) { | |
$('a').each(function() { | |
$(this).attr('href', 'javascript:window.location = "' + $(this).attr('href') + '"'); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment