參考連結:
範例:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script src="http://code.jquery.com/jquery-1.10.2.js"></script> | |
<script src="http://sdepold.github.io/jquery-rss/src/jquery.rss.js"></script> | |
<script> | |
jQuery(function ($) { | |
var rssurl = 'https://api.flickr.com/services/feeds/photos_public.gne?id=113975074@N04'; | |
//alert(rssurl); | |
$("#rss-styled").rss(rssurl, { | |
limit: 1000, | |
filter: function (entry, tokens) { | |
$.each(tokens, function (i, item) { | |
if (i == "body") { | |
var obj = $('<div/>').append(item); | |
$("#rss-styled").append(obj.find('p').eq(1).html()); | |
} | |
}); | |
} | |
}).show(); | |
}); | |
</script> | |
<div id="rss-styled"> | |
</div> | |
</body> | |
</html> |
DEMO:
沒有留言:
張貼留言