Return to Snippet

Revision: 10407
at December 26, 2008 18:34 by 1man


Initial Code
$.getJSON("http://example.com/chats.json?callback=?", function(data){
  $.each(data.chats, function(i,chat){
    alert(chat.body);
  });
});

Initial URL
http://actsasflinn.com/2008/06/13/cross-domain-restful-json-p-with-rails#jsonpwithjquery

Initial Description
Using JSON-P with jQuery. Note the callback.

Initial Title
JSON-P with jQuery

Initial Tags
javascript, jquery, json

Initial Language
JavaScript