jQuery Plugin To Display RSS Feeds On Your Webpage - YRSS
| File Size: | 11.3 KB |
|---|---|
| Views Total: | 14034 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
YRSS is a jQuery RSS reader plugin which uses YQL to fetch data from any RSS feed and display it on your webpage. Easy to customize with lots of configuration options.
How to use it:
1. Load jQuery library and the jQuery YRSS plugin at the end of the html document.
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script> <script src="yrss.js"></script>
2. Create a container to place your RSS feeds.
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <script src="yrss.js"></script>
3. Call the plugin on the container and specify the RSS source.
$('.rss-feed').yrss('http://feeds.feedburner.com/jquery-script?format=xml')
4. Style your RSS feeds.
.rss-feed {
...
}
.rss-feed h4 {
...
}
.rss-feed img {
...
}
5. Customize the plugin with the following options.
$('.rss-feed').yrss('http://feeds.feedburner.com/jquery-script?format=xml', {
// enable ssl
ssl: false,
// max number of items
limit: 10,
// enable cache
cache: true,
maxage: 3600,
// show error message
showerror: true,
// reverse
reverse: false,
// custom error message
errormsg: '',
// show tags
tags: false,
// show date
date: true,
// date format
dateformat: 'default',
// heading tag for titles
titletag: 'h4',
// show content
content: true,
// show snippet
snippet: true,
// show snippet image
image: false,
// max number of characters
snippetlimit: 120,
// href target attribute
linktarget: '_self'
// enables console log
logging: false
}, function () {
// optional callback function
});
Changelog:
2018-11-03
- Updated comments and grouped vars
2018-10-27
- Changed feed wrapper class
2017-07-25
- Add logging option
2017-03-15
- Changed method name and generated classes
2017-03-14
- Added cache control options
2017-03-13
- Added reverse option
2017-03-04
- Bugfix
2017-01-24
- Check for RSS description/encoded value
2016-12-17
- demo update
2016-12-16
- Modified snippet and image logic
2016-12-11
- Move image option out of snippet logic
2016-09-24
- Use strict mode
2016-09-23
- Added snippetimage option
- Check if entries are not inside an array (only 1 entry)
2016-04-16
- Added minified version of YRSS and minor updates
2016-01-24
- YRSS v1.0.0
This awesome jQuery plugin is developed by bbClassic. For more Advanced Usages, please check the demo page or visit the official website.











