tag is created only the first item
I do not know what I'm doing wrong but all the items should be within the
tag <li> item </li> but only the first item is, what can be?
javascript:
$.getJSON("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D'http%3A%2F%2Frss.cnn.com%2Fservices%2Fpodcasting%2Fac360%2Frss.xml'%20AND%20itemPath%3D%22%2F%2Fchannel%22&format=json&diagnostics=true&callback=?",
function (data) {
var titles = data.query.results.channel.item.map(function(item) {
return item.title;
});
$(".container-list-podcast ul").append('<li>' + titles.join('</li>'));
});
jsfiddle
No comments:
Post a Comment