Home » » jquery.rss

jquery.rss

This plugin can be used to read a RSS feed and transform it into a custom piece of HTML.

Setup

<!DOCTYPE html>
<html>
  <head>
    <title>jquery.rss example</title>
    <script src="lib/jquery-1.6.4.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
    <script src="src/jquery.rss.js"></script>
    <script>
      jQuery(function($) {
        $("#rss-feeds").rss("http://feeds.feedburner.com/premiumpixels")
      })
    </script>
  </head>
  <body>
    <div id="rss-feeds"></div>
  </body>
</html>
Note: Moment.js is optional. If you include it, jquery.rss will use it to format dates. If you do not want to include Moment.js, you may opt for providing your own date formatting function, or for not formatting dates at all.

Options

$("#rss-feeds").rss(
  "http://feeds.feedburner.com/premiumpixels",
  {
    // how many entries do you want?
    // default: 4
    // valid values: any integer
    limit: 10,

    // want to offset results being displayed?
    // default: false
    // valid values: any integer
    offsetStart: false, // offset start point
    offsetEnd: false, // offset end point

    // will request the API via https
    // default: false
    // valid values: false, true
    ssl: true,

    // which server should be requested for feed parsing
    // the server implementation is here: https://github.com/sdepold/feedr
    // default: feedrapp.info
    // valid values: any string
    host: 'my-own-feedr-instance.com',

    // outer template for the html transformation
    // default: "<ul>{entries}</ul>"
    // valid values: any string
    layoutTemplate: "<div class='feed-container'>{entries}</div>",

    // inner template for each entry
    // default: '<li><a href="{url}">[{author}@{date}] {title}</a><br/>{shortBodyPlain}</li>'
    // valid values: any string
    entryTemplate: '<p>{title}</p>',

    // additional token definition for in-template-usage
    // default: {}
    // valid values: any object/hash
    tokens: {
      foo: 'bar',
      bar: function(entry, tokens) { return entry.title }
    },

    // formats the date with moment.js (optional)
    // default: 'dddd MMM Do'
    // valid values: see http://momentjs.com/docs/#/displaying/
    dateFormat: 'MMMM Do, YYYY',

    // localizes the date with moment.js (optional)
    // default: 'en'
    dateLocale: 'de',

    // formats the date in whatever manner you choose. (optional)
    // this function should return your formatted date.
    // this is useful if you want to format dates without moment.js.
    // if you don't use moment.js and don't define a dateFormatFunction, the dates will
    // not be formatted; they will appear exactly as the RSS feed gives them to you.
    dateFormatFunction: function(date){},

    // the effect, which is used to let the entries appear
    // default: 'show'
    // valid values: 'show', 'slide', 'slideFast', 'slideSynced', 'slideFastSynced'
    effect: 'slideFastSynced',

    // a callback, which gets triggered when an error occurs
    // default: function() { throw new Error("jQuery RSS: url don't link to RSS-Feed") }
    error: function(){},

    // a callback, which gets triggered when everything was loaded successfully
    // this is an alternative to the next parameter (callback function)
    // default: function(){}
    success: function(){},

    // a callback, which gets triggered once data was received but before the rendering.
    // this can be useful when you need to remove a spinner or something similar
    onData: function(){}
  },

  // callback function
  // called after feeds are successfully loaded and after animations are done
  function callback() {}
)

Note about the host option

Since version 3.0.0 the plugin is no longer using the Google Feed API but a drop-in replacement called feedr. That server is currently running on Heroku and might have some downtimes, interruptions or unexpected issues. While I will try to keep those problems as rare as possible, it can totally happen from time to time. I might move the service to some other provide or even improve the infrastructure.
If you don't want to rely on the provided server and instead run your own version, you can just download feedr, install the dependencies and run it. As written above, you can specify the host which is used to parse the feeds with the host option.

Templating

As seen in the options, you can specify a template in order to transform the json objects into HTML. In order to that, you can either define the outer template (which describes the html around the entries) or the entry template (which describes the html of an entry).
The basic format of those templates are:
# layoutTemplate:
"<outer-html>{entries}</outer-html>"

# entryTemplate:
"<any-html>{token1}{token2}</any-html>"
So, let's say you have specified a limit of 2, using the upper pseudo html. This will result in the following:
<outer-html>
  <any-html>{token1}{token2}</any-html>
  <any-html>{token1}{token2}</any-html>
</outer-html>
There are some predefined tokens:
  • url: the url to the post
  • author: the author of the post
  • date: the publishing date
  • title: the title of the post
  • body: the complete content of the post
  • shortBody: the shortened content of the post
  • bodyPlain: the complete content of the post without html
  • shortBodyPlain: the shortened content of the post without html
  • teaserImage: the first image in the post's body
  • teaserImageUrl: the url of the first image in the post's body
  • index: the index of the current entry
  • totalEntries: the total count of the entries
  • feed: contains high level information of the feed (e.g. title of the website)
You can also define custom tokens using the tokens option:
$('#foo').rss(url, {
  entryTemplate: "{dynamic}, {static}, {re-use}",
  tokens: {
    dynamic: function(entry, tokens){ return "dynamic-stuff: " + entry.title },
    "re-use": function(entry, tokens){ return encodeURIComponent(tokens.teaserImageUrl) },
    static: "static"
  }
})
Please make sure to NOT define infinite loops. The following example is really BAD:
$('#foo').rss(url, {
  entryTemplate: "{loop}",
  tokens: {
    whoops: function(entry, tokens) { return tokens.loop() }
    loop: function(entry, tokens) { return tokens.whoops() }
  }
})
Here is a real-world example:
$('#foo').rss(url, {
  layoutTemplate: "<table><tr><th>Title</th></tr>{entries}</table>",
  entryTemplate:  "<tr><td>{title}</td></tr>"
})

Filtering

The plugin also allows you to filter specific entries in order to only print them:
$("#foo").rss(url, {
  limit: 100,
  filterLimit: 10,
  filter: function(entry, tokens) {
    return tokens.title.indexOf('my filter') > -1
  }
})
This will request 100 entries via the Feed API and renders the first 10 matching entries.

52 Comments:

Libby Howells said...

Looking for someone who can take my class for me? We're here to provide professional online help for class assignments, homework, exams & tasks.

Ammulu said...

technology write for us contribute (sponsored post) to The Weekend Leader. All guest bloggers have an opportunity to “Write For Us” Technology related guest post like, business, E-mail Online Marketing, Information Technology (IT), Top Gadgets, and top 10 Apps list, SEO, AI, Internet of Things (IoT) related content.

technology write for us said...

13377x proxy

Powerstar said...

The PDF edited by pdfsimpli can be used in digital publication marketing or compressing multimedia; you can use it in any way. Some of the features are provided underneath that will describe why it is known to be a prominent pdf editor online.

yadongbiz said...

I used to be checking continuously this weblog and I am impressed! Appreciate it for your efforts. Feel free t o visit my website; 야설

koreayadongcom said...

Everything is very open with a really clear explanation of the challenges. It was definitely informative. Your site is useful. Thank you for sharing. Feel free to visit my website;

국산야동




chinayadongnet said...

Hi! I just would like to give you a huge thumbs up for the great info you have got right here on this post. I'll be coming back to your site fo일본야동 r more soon. Feel free to visit my website;

Anonymous said...

Love it. Great work done. Nice website. Love it. This is really nice.
Hbomax/tvsignin
Disneyplus.com/Begin
Disneyplus com login begin
Cricut.com/setup

Unknown said...

Meanwhile, choosing to operate in Document Mode, you ensure the improved readability of your documents as a result of scanning the document. Similarly, in Photo Mode, you can get the best quality of your photos scanned. ij scan utility | ij canon scan utility

casinositezone.com said...

Very nice article and straight to the point. I don't know if this is truly the best place to ask but do you folks have any idea where to get some professional writers? Thank you. Feel free to visit my website;
바카라사이트

technology write for us said...

[pii_email_a42277285fa7a777ff7e] error is the most common error that anyone can face this issue in their daily life. If you are also looking to get over this error, then you are at the right place.

honeywebsolutions said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
write for us digital marketing
free movies online popcornflix
<a href="https://bloggerguestpost.com/vegamovies/>vegamovies</a>

Jessica Lucas said...

The new report by Expert Market Research titled, ‘Global Vegetable Oil Market Size, Price, Share, Trends, Report and Forecast 2022-2027′, gives an in-depth analysis of the global vegetable oil market, assessing the market based on its segments like oil types, applications, and major regions. The report tracks the latest trends in the industry and studies their impact on the overall vegetable oil price market. The major players in the market are Bunge Limited (NYSE: BG), ADM (NYSE: ADM), Wilmar International Ltd. (SGX: F34), Louis Dreyfus Company and, Cargill, Incorporated (INDEXDJX: .DJI) among others. The report also covers the market shares, plant turnarounds, capacities, expansions, investments, and mergers and acquisitions, among other latest developments of these market players. Expert Market Research cover over 100 industries across established and emerging markets researched by our skilled analysts who track the latest economic, demographic, trade and market data globally.

FamilyTreeMakerHelps said...

Family Tree Maker 2019 Setup Guides

Sync Family tree maker with Ancestry

How to recover Ancestry username and password

Family Tree Makers (FTM) sync issues

Family tree maker replacement

Family tree maker file converter

FTM 2017 download

How to fix display issues in Family Tree Maker for windows?

BACK UP AND SYNC LOGS IN FAMILY TREE MAKER 2019

ERROR WHEN DISPLAYING TREE IN FAMILY VIEW ON ANCESTRY

rosie said...

In the world of casinos there are some very popular techniques that can increase your chances of winning games like roulette.write for us casino

dubsmashmovie said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
write for us entertainment also known as guest posting, is the practice of writing a blog post for another company’s website. Usually, bloggers write on relevant topics within their industry to attract traffic to their website. According to experienced SEO experts, guest posting always pays off and is the best way to earn high-quality links. Being referred or featured on reputed websites will go a long way toward helping you rank high in search engines.
read more;write for us entertainment
7starhd new proxy links
filmy wap website
Isaidub
rdxhd 2022
sdmoviespoint proxy
coolmoviez
skymovies in 2022

casinositeone.JDS said...

I will support you.Such a very useful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. 카지노

casinosite777info.JDS said...


This is very interesting, You’re a very skilled blogger. I have joined your feed and look forward to more of your magnificent post. 온라인카지노

casinositezone.JDS said...

just like to say thank for a tremendous post and all round interesting website. 바카라사이트

technology write for us said...

So you have searched about how to pair this Spotify. However, for your information, let us tell you that with the help of a link like “https//spotify.com/pair”, you can pair Spotify on your TV as well.

techhubbblog said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff. “Technology Write For Us” to techhubblog.com is a universal platform for tech-related news such as trends and updates in the latest technology, reviews on newly launched gadgets, the Internet of things, tips, and strategies on digital marketing, Robotics, Artificial Intelligence, practicable Business ideas, etc. technology write for us cinemavilla tamil movies technology business write for us 1887x torrent search engine 9xmovies 2022 13377x proxy list 13377x

techupdates said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
Tech Updates World always welcome new writers who want to guest post, Sponsor Post or contribute articles regularly.
Write for Us Technology
Write For US Gadgets

insurance said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
Insurance Exchange is focused on creating sustainable value growth through innovative solutions and unique partnerships. Our values are at the heart of our business reputation and are essential to our continued success. We foster an environment to instill these values in every facet of our organization.
insurance exchange

Jennifer Mofi said...

Every user can update the honda navigation system with ease. All you have to do is follow some basic instructions, and you can update the honda Navi by yourself. Most of the time, customers ask whether their updates are free or paid.

We want to inform you that all Honda Navi updates are free of cost most of the time. A few times, the updates are paid if you have an older honda vehicle. Many times consumers end up paying a good amount of money to the local dealers. We want to inform you that you can get the updates for yourself without paying any additional fees or charges if you can follow some basic steps

Anonymous said...

The MetaMask sing in accounts provide an exclusive outlet to keep crypto
protected along with easy access to the decentralized applications on the network.

Anonymous said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.write for us packers and submit a guest post on movers? If so, you have come to the right place. For the past few years, we have been looking to make our blog the go-to place where our readers can find relevant information about tips, trends and their impact as well as ramifications and more information on packers and movers.if you are looking to write for us on real estate, submit a guest post about movers, or commercial real estate write for us, here’s your chance. Our primary goal is to provide our readers with reliable information in the form of high-quality content. And, if you think you can submit a guest post on movers and write for us packers, here’s your chance to go for it.Guest posting is an important strategy for writers to become well-known in the industry and ensure readers rely on information provided by them. Hence, you should think of writing for us packers and submitting a guest post on movers. But, before we get started, here are some guidelines you need to follow. write for us on real estate

Unknown said...

Do you want to contribute an article to one of the biggest and fast growing real estate communities in the world.place write for us! We accept quality home improvement guest posts with image.Then you are on right place,Niche we only accept real estate, properties,We only accept articles that are written in English Language,We don’t accept guest post articles that are published somewhere else.After publishing article on our site you can’t publish that article on another site.Please read About Topic suggestions and How to send article Real estate guest post

DAVE said...

Awesome post thank you for sharing
https://www.coast-bookmarks.win/customer-acquisition-platforms-1

srasta2 said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.We are looking for those who are interested in construction "write for us everyday with new thoughts. We want you to write for us construction category because we love new ideas and fresh content quality. If you would like to write down on property, land , construction and residential improvement related topics then we might be glad to publish your article. we might wish to give your talent the audience it deserves. a variety of fine writers have gotten the chance to showcase their writing skills on our website. Read on to seek out how you’ll become one among them.

cragro.com said...

This is a very professional blog. Thank you for this information which will be very helpful for my work. 스포츠토토 메이저놀이터

Anonymous said...

I'm glad to find the best bibliography. Thank you for sharing a useful article. 토토사이트

Anonymous said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff. digitaltechmedia.com! One of the best guest blogging site with high quality content and domain authority. Write For US- Business, Tech News, Social media, Cloud Computing, Gadgets, Computers, Hardware, Apps / Reviews, SEO & Search Marketing and Operating Systems etc. We work hard to bring about best content that add value to them.As you’re hoping to become a contributor, you’re bound to follow our Guest Post Guidelines. These guidelines have been put in place to bring the quality content in and weed spam out.Every guest post that you publish at our portal is visited, read and transacted by our huge audience base. And the numbers are growing. Who knows a few of them could be your permanent customers!!! technology write for us

Tech Write for Us said...

pls check this Tech write for us

Anonymous said...

Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff. webtodaytech.com! One of the best guest blogging site with high quality content and domain authority. Write For US- Business, Tech News, Social media, Cloud Computing, Gadgets, Computers, Hardware, Apps / Reviews, SEO & Search Marketing and Operating Systems etc. We work hard to bring about best content that add value to them.As you’re hoping to become a contributor, you’re bound to follow our Guest Post Guidelines. These guidelines have been put in place to bring the quality content in and weed spam out. know about gadgets

Aarush said...

Overall, utsav7Fun is the best Indian entertainment website because it is easy to use and it always has new content.

Marry New said...

I'm just awestruck by your work and curious about how you ran this blog so skillfully. I can't afford not to read this important information anytime I browse the internet because it's so amazing! Today, I got to the conclusion that this was the best source for my needs in terms of economics homework help. He possesses the skills and knowledge necessary to complete challenging statistical tasks on time. Tomorrow I'll start giving him a lot of orders.

Javierk said...

Thanks, nice information.

Javierk said...

ibomma telugu movies new 2022 apk download

Smooth Kickin Keto Gummies said...

This is precisely why I don't start with Diet Pills and in the end you ought to choose what's right for you. I purchased Diet Pills. Educating yourself from past experiences can be really useful. Not stunningly, it's how I sense most advisors do it. This is how to determine your own Diet Pills path and it was dignified. Many laypersons do a fragile amount of work on their Weight Loss.

https://www.offerplox.com/weight-loss/kickin-keto-gummies/

https://www.supplementz.org/gold-coast-keto/
https://www.offerplox.com/skin-care/amarose-skin/
https://www.offerplox.com/weight-loss/gold-coast-keto/
https://www.offerplox.com/cbd-products/proper-cbd-gummies/
https://www.supplementz.org/apple-keto-gummies-australia/
https://www.eunews24.com/post-spotlight/lifeline-keto-acv-gummies-hoax-exposed-ketofitastic-acv-gummies-reviews-eunews24/

The one clinic said...

Thanks for sharing.
The One Clinic is a leading cosmetic medical and dental clinic in dubai. We offer you the best in cosmetic solutions, from non-surgical to surgical treatments.

Unknown said...

Shah Rukh Khan is a big star of Hindi cinema popularly known as Bollywood. He is called the King of Bollywood and the biggest superstar in the world. His journey from an outsider's position in the predominantly dynastic Hindi film business to the top spot may look like something out of a storybook.
For more info:- https://www.zongaroo.com/shah-rukh-khan-biography-movies-age-net-worth-height-houses-cars-family-more/

optislim-harga said...

https://www.salubritymd.com/optislim-harga/

Amy R. Conner said...

Official Website : https://www.offerplox.com/casino/spacewin-casino/

Official Website : https://www.offerplox.com/crypto/bitcoin-fast-profit/

Preslin said...

Really helpful post. jquery.RSS into a custom HTML. Thanks for giving the entire coding. Coding is much needed. Thanks for sharing this informative post. Keep posting more on HTML topics. King George Traffic Lawyer

Lipoxin Para Que Sirve said...


That caused me to have a spell of extreme informational disequilibrium. No matter how you examine it, you must be cautious. Do you publish photos online for the amusement of punks? There are a wide range of slants on this wide ranging issue. In the wake of Diet Pills a lot of things changed. That was a juicy story.

I would suggest apprentices join in. Do they comprehend that time is of the essense?

https://www.supplementz.org/lipoxin-comentarios/

Truman CBD Male Enhancement said...

Official WebSite :-
https://www.salubritymd.com/truman-cbd-male-enhancement-gummies/
https://www.salubritymd.com/smilz-cbd-gummies-reviews/
https://www.salubritymd.com/supreme-keto-acv-gummies/
https://www.salubritymd.com/

casinositerank said...

Good blog you have got here.. It’s hard to find quality writing like yours these days. Thank you for sharing.

totosafesite said...


Great content material and great layout. Your website deserves all of the positive feedback it’s been getting.

federal wire fraud defense lawyer said...

this is really good post here. Thanks for taking the time to post such valuable information.

appliance repair Overland Park said...

Very nice website as well as nice article, i must say. thank you

mateo said...

reading IR blogs can be a great way to learn more about the field and to stay up-to-date on the latest developments. However, it is important to be aware of the limitations of blogs and to critically evaluate the information that you read.This blog is run by the Information Retrieval Society, and it covers news and events related to IR.
estate lawyer near me Virginia

ethan hawke said...

canon printer problems by which you can undoubtedly figure out how to set up from canon and improve insight. ij.start.canon

Popular Posts