Get a xml feed from a WordPress site using jQuery

To get a xml feed from a WordPress site and add it to a bulleted list:

Add this to the body:

    <ul id="posts"></ul>

Add this to the footer of the page:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script>
    $(function() {
        
		url = 'http://www.endreywalder.com/blog/rss?'+parseInt($.now());
		$.ajax({
			type: "GET",
			url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1000&callback=?&q=' + encodeURIComponent(url),
			dataType: 'json',
			error: function(){
				alert('Unable to load feed, Incorrect path or invalid feed');
			},
			success: function(xml){
				values = xml.responseData.feed.entries;
				console.log(values);
				$.each( values, function( i, val ) {
				  console.log(i);
				  console.log(val.link);
				  console.log(val.title);
				  $("#posts").append("<li><a href='"+val.link+"'>"+val.title+"</a></li>");
				});
			}
		});
	
    }); 
    </script>