I have created a JSON file with various data:
[
{
"date": "17.06.",
"event": "The Stoles gig",
"url": "http://thestoles.com/"
},
{
"date": "25.06.",
"event": "The Editors release an EP",
"url": "http://theeditors.com/"
}
]
Everything is rendered correctly in the HTML file, except for the URL, which doesn't show as a link.
Here's my code:
$(document).ready(function() {
$.getJSON('feeds.json', function(data){
$.each(data, function(i, item){
$('#feeds').append(item['date'] + item['event'] + item['url'] + "</br>");
});
});
});
Any suggestions?
<a>). w3.org/TR/html4/struct/links.html (FYI, this has nothing to do with JSON, so I updated your question).'href'property of an'<a href='..'> text shown </a>'in that .append