UPDATE 07.14.15 Losing all hope... I'm assuming my fix will be javascript related but I don't know it at all. Is my current code stopping my HTML target="Blanks" from working?
I'm making an HTML/CSS app that's downloaded on an iPad Mini. It's a simple 30+ page site with text and images. I used this javascript to make all my href's open inside the app:
$(document).ready(function(){
if (("standalone" in window.navigator) && window.navigator.standalone) {
// For iOS Apps
$('a').on('click', function(e){
e.preventDefault();
var new_location = $(this).attr('href');
if (new_location != undefined && new_location.substr(0, 1) != '#' && $(this).attr('data-method') == undefined){
window.location = new_location;
}
});
}
});
Which is fine and great. I want the site to work in its own window, to look like a native app.
NOW I need to make this ONE link open up in Safari (it would have to open Safari and switch to that window).
target="_blank" doesn't work, or rel="external"
How do you have links that open inside a web app AND other links open in Safari?
This question How to open Safari from a WebApp in iOS 7 is similar to mine, but the fix won't work for me, and I'm in iOS 8 now.