Currently, I'm working on compiling a list of videos that includes the title, link, image, and creator of each video. It's been a bit challenging :S
<script type="text/javascript">
$(document).ready(function(){
$.getJSON('http://gdata.youtube.com/feeds/users/Username/uploads?alt=json-in-script&callback=?&max-results=12&start-index=1', function(data) {
$.each(data.feed.entry, function(i, item) {
var title = item['title']['$t'];
var video = item['id']['$t'];
video = video.replace('http://gdata.youtube.com/feeds/videos/','http://www.youtube.com/v/');
videoID = video.replace('http://www.youtube.com/watch?v=','');
$('.allvideos').append('<a rel="shadowbox[video];height=390;width=640;" href="'+video+'" style="width:100%;display:block;"> '+title+'</a>');
Shadowbox.setup();
});
});
});
</script>
Can anyone guide me on how to achieve this?
<div class="allvideos">
<div class="video">
<img src="[VIDEO_ICON]" />
<a href="[VIDEO_URL]">
<span>{NAME_VIDEO}</span>
<span>{NAME_CREATOR}</span>
</a>
</div>
</div>
Appreciate any help.