Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 10th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script>
  2. $.getJSON("http://www.reddit.com/r/treecomics/.json?jsonp=?", function(data) {
  3.     var items = data.data.children;
  4.     $.each(data.data.children, function(i, item) {
  5.                
  6.                 $("<br>", {
  7.         }).appendTo($("#images"));             
  8.                 $("<a/>", {
  9.             href: item.data.url,
  10.                         text: item.data.title + " - (" + item.data.score + " points)"
  11.         }).appendTo($("#images"));             
  12.                 $("<br>", {
  13.         }).appendTo($("#images"));
  14.  
  15.     });
  16.             });
  17. </script>