I\'m trying to open links in Safari (on an iPhone) from a PhoneGap application. I\'m using PhoneGap version 3.1.0, and use PhoneGap Build, to build the application.
This is how i solved in Cordova/Phonegap 3.6.3
Install the inappbroswer cordova plugin:
cordova plugin add org.apache.cordova.inappbrowser
I wanted to keep my phonegap app as similar as possible to a standard web page: I wanted that by having target="_blank" on a link, it would open in an external page.
This is how i implemented it:
$("a[target='_blank']").click(function(e){
e.preventDefault();
window.open($(e.currentTarget).attr('href'), '_system', '');
});
so all i have to do is use a link like the following
Link