Thanks for that, this is working brilliantly. I changed some of it and it seems to be working well. I have a question tho. This is working great with the url in the code below, however this is only part one of my app. The second part wants to stream some jobs from a new URL. But this is not working, this URL has a file extension of .xml unlike the url that works which is much cleaner and shorter.
I didnt think it was working at all but have just released that it is grabbing the feed, but in the console it is displaying no entries. Is this because its an .XML file. If so, is there anything i can do to resolve this. Or if not, what i can i tell my web hosts to do to change the url so that I can stream from it. Unfortunately they did say I cant have it in JSON, but they have managed to get one feed to work for me!
//Finished code so far
var gurl = "https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=20&q=";
var ynews = 'http://www.vetsonline.com/actualites/rss.php?rubrique_id=262,263,479';
$.get(
gurl + encodeURI( ynews ) + "&callback=?",
function(data) {
if( data.responseStatus == 200 ) {
console.log( data );
var newsFeed = '<ul data-role="listview" data-filter="true"';
$.each(data.responseData.feed.entries,function(i,v) {
newsFeed += '<li>';
newsFeed += '<a href= "'+ v.link +'" >';
newsFeed += '<h3>' + v.title + '</h3>';
newsFeed += '<img src="http://www.vetsonline.com/actualites/upload/vetsonline3R/site_vetsonline3r_actu64184_photo.jpg"/>';
newsFeed += '<p>' + v.contentSnippet + '</p>';
newsFeed += '<p>' + v.publishedDate + '</p>';
newsFeed += '</a>';
newsFeed += '</li>';
});
newsFeed += '<ul>';
$('#NewsHome').html(newsFeed);
} else {
alert( 'There was an error' );
}
$('#NewsHome').trigger( 'create' );
},
'json'
);