This is my code:
marker.addListener('click', function(){
var content = "";
var query = {geo: place.place_name};
$.getJSON("articles.php", query)
.done(function(data, textStatus, jqXHR){
if(data != [])
{
content += "<ul>";
for(var i = 0; i < data.length; i++)
{
content += "<li><a href=\"" + data[i].link + "\" target=\"_blank\">" + data[i].title + "</a></li>";
}
content += "</ul>";
}
else
{
content += "No articles for this area";
}
})
.fail(function(jqXHR, textStatus, errorThrown) {
// log error to browser's console
console.log(errorThrown.toString());
});
showInfo(marker, content);
});
If I click on a marker and check the Network the request seems fine and the link works if I put it directly into the browser. There aren't any console error and I tried different solutions but I keep getting a white infoWindow. I can't figured out what I'm I doing wrong!
Thanks!