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.

example-proxy.html 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 - example</title>
  7. <style type="text/css">
  8. h3 { margin-bottom: 5px; }
  9. div.updated { color: #999; margin-bottom: 5px; font-size: 0.8em; }
  10. </style>
  11. <script type="text/javascript" src="jquery/jquery.js"></script>
  12. <script type="text/javascript" src="build/dist/jquery.jfeed.pack.js"></script>
  13. <script type="text/javascript">
  14. jQuery(function() {
  15. jQuery.getFeed({
  16. url: 'proxy.php?url=http://www.hovinne.com/feed/',
  17. success: function(feed) {
  18. jQuery('#result').append('<h2>'
  19. + '<a href="'
  20. + feed.link
  21. + '">'
  22. + feed.title
  23. + '</a>'
  24. + '</h2>');
  25. var html = '';
  26. for(var i = 0; i < feed.items.length && i < 5; i++) {
  27. var item = feed.items[i];
  28. html += '<h3>'
  29. + '<a href="'
  30. + item.link
  31. + '">'
  32. + item.title
  33. + '</a>'
  34. + '</h3>';
  35. html += '<div class="updated">'
  36. + item.updated
  37. + '</div>';
  38. html += '<div>'
  39. + item.description
  40. + '</div>';
  41. }
  42. jQuery('#result').append(html);
  43. }
  44. });
  45. });
  46. </script>
  47. </head>
  48. <body>
  49. <h1>jFeed - jQuery feed parser plugin - example</h1>
  50. <div id="result" />
  51. </body>
  52. </html>