Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
douglasmiranda / get-latest-videos.js
Created September 21, 2011 15:05
Get latest videos from Youtube with Jquery (Gdata API)
function show_my_videos(data){
html = ['<ul id="youtube-videos">'];
$(data.feed.entry).each(function(entry){
url = this.link[0].href;
url_thumbnail = this.media$group.media$thumbnail[3].url;
description = this.media$group.media$description.$t;
html.push('<li><a href="'+url+'">');
html.push('<img src="'+url_thumbnail+'" alt="'+description+'">');
html.push('</a></li>');
});