I am developing mobile app(IOS/android) UI with phonegap/cordova 2.1.0. I want to open a link given in href attribute of anchor tag in a new window/page. I tried :
target="_blank"
But it is not working in IOS. Any workaround available?. Thanks
If you can use JQuery :
<a href="http://link.com" rel="external">link</a>
Javascript :
$(document).ready(function(){
$('a[rel="external"]').click(function() {
window.open($(this).attr('href'));
return false;
});
});
Sources
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With