Home

Using jQuery to display a Yahoo! Pipe

I found myself wanting to display a feed on a webpage and it turned out to be a peace of cake using Yahoo! Pipes and jQuery:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    $.getJSON("http://pipes.yahoo.com/pipes/pipe.run?_id=PIPEID&\
_render=json&_callback=?", 
      function(data) {
        $.each(data.value.items, function(i, item) {
          $('#items').append('<li><a href="' + 
	  item.link + '">' + item.title + '</a></li>');
        });
      });
  });
</script>

<ul id="items">
</ul>

Just replace PIPEID with the id of your pipe.


Feed
rigtorp.se
github.com/rigtorp
flickr.com/photos/erkki
se.linkedin.com/in/rigtorp
google.com/profiles/rigtorp
CC • written by Erik Rigtorp