This jQuery code response with “undefined” why ??
function YouTube2()
{
$(document).ready(function(){
var txt="";
var url='https://gdata.youtube.com/feeds/api/videos?q=GoogleDevelopers&max-results=10&v=2&alt=jsonc';
$.getJSON(url,function(json) {
alert("ss");
$.each(json.data.items, function(index, elem) {
alert(json.data.items[index].thumbnail.default);
});
});
});
}
YouTube2();
change default to sqDefault or hqDefault
http://sandbox.phpcode.eu/g/6aea7
to
or to