Skip to content

Instantly share code, notes, and snippets.

@Ahrengot
Created September 26, 2012 11:51
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Ahrengot/3787592 to your computer and use it in GitHub Desktop.
Save Ahrengot/3787592 to your computer and use it in GitHub Desktop.
Prevent iOS web app's from opening internal links in safari
@Ethanhackett
Copy link

This is excellent! It's better than the other scripts i've implemented. You seemed to have taken into account anchors with hashtags (which I use for buttons to trigger jQuery events.) but still allows users to click to outbound urls too.

Would you mind adding the code with comments to help explain the logic behind how you designed it?

@Ethanhackett
Copy link

p.s. I was just exploring some other options this morning and I'm wondering if there would be a simple way to use the jQuery load method on internal pages to use an ajax load for page content. This way toolbars and such could stay while the page is loaded.

$("#area").load("something.html #area > *");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment