Error in displaying retrieved JSON content-Collection of common programming errors

In continuation to my question asked here, i have created a test app to check the json parsing using jquery. It doesnt seem to work. I can append data in the click function. However getting data from that url and parsing seems to fail. Can someone provide some useful hints?





$(document).ready(function(){
  $("button").click(function(){
    $("body").append("
    jffnfjnkj
");
    $.getJSON("http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?callback=function&alt=jsonc&v=2", function(data) {
        var dataContainer = $("#data ul");
        $.each(data.data.items, function(i, val) {
         $("body").append("
    jffnfjnkj
");
if (typeof(val.player) !== 'undefined' && typeof(val.title) !== 'undefined') {
dataContainer.append("
  • "+val.title+"
  • ");
            }
            });
            });
    
    
      });
    });
    
    
    
    
    

    Header


    Paragrapgh
    Paragraph. Click me

    TIA, Praveen S

    Originally posted 2013-11-09 22:49:19.