jQuery RSS/ATOM feed parser plugin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test-dist.html 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>jFeed - jQuery feed parser plugin - test</title>
  7. <script type="text/javascript" src="jquery/jquery.js"></script>
  8. <script type="text/javascript" src="build/dist/jquery.jfeed.js"></script>
  9. <script type="text/javascript">
  10. jQuery(function() {
  11. var feedsUrls = ['xml/rss-091.xml',
  12. 'xml/rss-092.xml',
  13. 'xml/rss-10.xml',
  14. 'xml/rss-20.xml',
  15. 'xml/atom.xml'];
  16. for(var i = 0; i < feedsUrls.length; i++) {
  17. jQuery.getFeed({url: feedsUrls[i], success: function(feed) {
  18. console.log('feed type: ' + feed.type);
  19. console.log('feed version: ' + feed.version);
  20. console.log('feed title: ' + feed.title);
  21. console.log('feed link: ' + feed.link);
  22. console.log('feed description: ' + feed.description);
  23. console.log('feed language: ' + feed.language);
  24. console.log('feed updated: ' + feed.updated);
  25. console.log('feed items: ' + feed.items.length);
  26. for(var j = 0; j < feed.items.length; j++) {
  27. console.log('item ' + j + ' title: ' + feed.items[j].title);
  28. console.log('item ' + j + ' link: ' + feed.items[j].link);
  29. console.log('item ' + j + ' description: '
  30. + feed.items[j].description);
  31. console.log('item ' + j + ' updated: ' + feed.items[j].updated);
  32. console.log('item ' + j + ' id: ' + feed.items[j].id);
  33. }
  34. }
  35. });
  36. }
  37. });
  38. </script>
  39. </head>
  40. <body>
  41. <h1>jFeed - jQuery feed parser plugin - test</h1>
  42. <p>Please open Firefox + Firebug console</p>
  43. </body>
  44. </html>