jquery.rss example

From https://github.com/sdepold/jquery-rss

by Anov Siradj

HTML

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<script src="//sdepold.github.io/jquery-rss/src/jquery.rss.js"></script>
<div>
     <h1>jquery.rss example</h1>
    <ul>
        <li>Project available at <a href="https://github.com/sdepold/jquery-rss" target="jquery-rss">https://github.com/sdepold/jquery-rss</a></li>
        <li>This demo includes the jQuery plugin from http://sdepold.github.io/jquery-rss/src/jquery.rss.js</li>
    </ul>
    <h2>Default options</h2>
    <div id="rss-default" class="well" style="display:none;"></div>
    <h2>Same feed <small>with some custom styling</small></h2>
    <div id="rss-styled" class="well" style="display:none;"></div>
    <h2>Metro <small>for a customer</small></h2>
    <div id="rss-metro" class="well" style="display:none;"></div>
</div>

<p>CSS provided by <a href="http://getbootstrap.com/">Bootstrap</a>, an unrelated project</p>

JavaScript

$("#rss-default").rss("http://www.recruiter.com/feed/career.xml").show();

$("#rss-styled").rss("http://www.recruiter.com/feed/career.xml", {
    limit: 5,
    layoutTemplate: '<dl class="dl-horizontal">{entries}</dl>',
    entryTemplate: '<dt><a href="{url}">{title}</a></dt><dd>{shortBodyPlain}[{author}@{date}]</dd>'
}).show();

$("#rss-metro").rss("http://www.recruiter.com/feed/career.xml", {
    limit: 4,
    layoutTemplate: '<span id="entries">{entries}</span>',
    entryTemplate: '<a href="{url}">{title}</a>|'
}).show();