List view from JSON open in InApp Browser
Hey all,
I use JSON to list the latest posts from my website in listview for jquery mobile in a iPhone app that uses phonegap.
When the user clicks the link I want it to open in the InApp browser of phonegap but cannot get it to work!!
The .ajax call is working and a list is being created with the <a> links. Below is the bit that isn't working even though it's similar to a button example that does work on my app elsewhere
This does NOT work:
$('#datasales').append("<li><a href='#' data-role='button' onClick='window.open('"+ item.url +"', '_blank', 'location=yes');return false;'>" + item.title_plain + "</a></li>");
Even though this does:
<li><a href="#" onClick="window.open('http://www.facebook.com/link','_blank','location=yes');return false;">FaceBook<span class="ui-li-count">$1,000</span></a></li>
I don't get it :(