Skip to content

Instantly share code, notes, and snippets.

@shazron
Last active September 17, 2020 17:58
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shazron/4694032 to your computer and use it in GitHub Desktop.
Save shazron/4694032 to your computer and use it in GitHub Desktop.
Anchor tag link replace for InAppBrowser (Apache Cordova)
// warning, jQuery code below
$(document).ready(function() {
var $a = $("a");
$a.click(function(x) {
x.preventDefault();
var url = $(this).attr('href');
launchUrl(url); // where launchUrl is your function that calls window.open, etc
});
});
@poornerd
Copy link

ditto -> I have the same problem. I want to open dynamically generated links in an iframe (with code I do not control) in the inAppBrowser.

@benmcmaster
Copy link

Yep I have this problem too... the little youtube logo in embedded youtube videos open in the current webview in my app. You have to quit the app to get back. Terrible experience.

@ladmerc
Copy link

ladmerc commented Sep 30, 2016

Hey @benmcmaster, any luck resolving this?

@mahesha-mahi
Copy link

Is it possible to make anchor tags in iframe also opens in inappbrowser

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