Skip to content

Instantly share code, notes, and snippets.

View AmmarCodes's full-sized avatar

Ammar Alakkad AmmarCodes

View GitHub Profile
@AmmarCodes
AmmarCodes / get-latest-videos.js
Last active March 20, 2019 17:17 — forked from douglasmiranda/get-latest-videos.js
Get the latest videos from a YouTube channel with jQuery.
function show_my_videos(data){
html = ['<ul id="videos">'];
$(data.data.items).each(function(item) {
id = item.id;
description = item.title;
html.push('<iframe width="560" height="315" src="//www.youtube.com/embed/'+ id +'" frameborder="0" allowfullscreen></iframe>');
});
$("#videos").html(html.join(''));
}
// Replace [YOUTUBE_CHANNEL] with the channel you want