jQuery feed reader – jgfeed

I was trying to find a way to get the latest article posts dynamically on the homepage M2Volt.com. This needed to be client side since it is outside of the CMS we are using for our blog page. I stumbled upon a plugin on the jQuery site, jgfeed, that blew my socks off it was so easy to use and I decided to write this one up.

Check out this jQuery plugin: http://plugins.jquery.com/project/jgfeed

Here is how easy this plugin is to use:

Step 1: Link to the JS



Step 2: Configure a snippet of JS

jQuery.jGFeed('http://www.m2volt.com/blog/feed/',
function(feeds){
  // Check for errors
  if(!feeds){
    // there was an error
    return false;
  }
  // do whatever you want with feeds here
  for(var i=0; i"
    + entry.title + "

" + entry.publishedDate + "

" + entry.contentSnippet + " "); } }, 3);

This will inject 3 entries to the div with id=”injectRssFeed”

Step 3: Uhh, thats it.

Check out the Latest Blog Posts section: m2volt.com

Mad props to the guys who developed this plugin.

Tags: ,

  • Sdfs
    sdfsdfs
  • Dave
    Thanks for the post. Very helpful
  • ved
    This can handle only one RSS source. Is there a way to configure this to handle several ?
  • To answer your question its simple... Yes. I built a little example for you:

    http://marioedgar.com/source_f...

    Look at the source code, all you have to do is implement the same javascript and change the name of the container you want to inject the code into
  • Robincwillis
    In your example you are just creating different different jgFeed functions to handle different sources, what if you wanted to configure a single jGFeed function to handle multiple sources into a single json object which you could then sort by different criteria such as date?
  • Robincwillis
blog comments powered by Disqus

© 2010 M2Volt all rights reseved

back to top