Wednesday, 7 January 2015

Want to fetch the RSS feed and render on the html using jquery



I am trying to render this url http://ift.tt/QtugTM to fetch all the xml information using jquery but i came across something on jsonp thats giving me a callback ,how do i handle that callback to render each node in the html.


I tried the below code:





<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>RSS Feed testing</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
var result;
function jsonparser1() {
$.ajax({
type: "GET",
url: "http://ift.tt/QtugTM",
dataType: "jsonp",
success: function (result) {
$("div").html(result);

},
});
}

$(document).ready(function(e) {
jsonparser1();
});
</script>
</script>
</head>

<body>
<div></div>

</body>
</html>



I googled, about jsonp ,its quite confusing to me.


No comments:

Post a Comment