I'm using jQuery Mobile & Phonegap, and have the following code to open all external links in a certain div with the ChildBrowser:
$('.someDIV a').live('click', function() {
var thisUrl = $(this).attr('href');
PhoneGap.exec("ChildBrowserCommand.showWebPage", thisUrl);
return false;
});
For some reason, while the page loads in the childbrowser, it also loads in the background, as if there's no "return false".
I've found a workaround by giving the link's href attribute a value of "#", and using the title for the url like this: And updating the jQuery code accordingly, but this is a problem where my links are dynamically generated, and I can't have the url in the title attribute.
Any ideas how to solve this?