Return to Snippet

Revision: 20366
at November 13, 2009 10:43 by 1man


Initial Code
jQuery(function($){
	//The yahoo pipe url (callback can be in the url, just pointing it out)
	var pipeURL = "http://pipes.yahoo.com/pipes/pipe.run?_id=00000000000000000000000&_render=json" + "&_callback=?";
	
	var feedSuccess = function(date, status){
		//Do something with it
		var html = "<ul>";
		$.each(data.value.items, function(i,item){
			html += "<li>" + item.title + "</li>";
		});
		html += "</ul>";
		
		//Add the feed to the page
		$("#insertFeed").empty().append(html);
	};
	
	/**
	* Make the ajax call. You can also use $.getJSON.
	*/
	$.ajax({
		dataType: "json",
		url: pipeURL,
		success: feedSuccess,
		timeout: 4000
	});
});

Initial URL


Initial Description
Very simple example of pulling in a JSON feed from Yahoo pipes using jQuery.

Initial Title
jQuery and Yahoo pipes simple ajax call

Initial Tags
ajax, jquery

Initial Language
jQuery