json + jquery + youtube playlist.

  • # March 11, 2010 at 5:16 am

    I’m really struggling with that.
    I’m using jquery to parse a youtube json file containing the element of a playlist.
    by now all I wanna do is get an alert for each video in the playlist containing the video id.

    here is the code:

    $(document).ready(function() {
    $.getJSON(‘http://gdata.youtube.com/feeds/api/playlists/2D9CAD13837D67EE?&v=2&alt=jsonc&callback=?’,function(data) {
    $.each(data.items, function(i,item){
    alert( ” + item.video.id + ”);

    if ( i == 10 ) return false;

    through firebug seems that the json file is opened correctly, but the parsing give me no results…
    any help?


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed