Código:
<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']; var image = item['media$group.media$thumbnail.url']; video = video.replace('http://gdata.youtube.com/feeds/videos/','http://www.youtube.com/v/'); videoID = video.replace('http://www.youtube.com/watch?v=',''); $('#mybox').append('<div class="popit video"><img class="image" src="'+image+'" /><a href="'+video+'" rel="shadowbox[video];height=390;width=640;"><span class="title">'+title+'</span><span class="by">By <span class="creator">Creador</span></span></a></div>'); Shadowbox.setup(); }); }); }); </script>
Código HTML:
<div id="mybox"> </div>