Fork me on GitHub

pe_pplog demo page

Main menu

RSS feed

It is possible to parse a RSS feed with JQuery and thus with some friendly help from Paul and the internet I wrote a small script to display an RSS feed in the menu (in this case the latest entries of my travel blog):

This is the script:
<script>	var rssurl=\'\';

$.get(rssurl, function(data) {
var $xml = $(data);
var $item = $xml.find("item").slice(0,5);
$item.each(function() {
var $this = $(this),
item = {
title: $this.find("title").text(),
link: $this.find("link").text(),
description: $this.find("description").text()

$("#feed-container").append($(\'<a></a>\').attr(\'href\',\'target\',\'_blank\').html(item.title), $(\'<p></p>\').html(item.description));
<!-- Edit the following according to need -->
<h1>Travel Blog Entries</h1><div class="slide"><a id="flip" href="/travel" target="_blank">view travel blog »</a><div class="hide" id="feed-container">

Add to "our $config_customMenuHTMLbottom". Only works with RSS feeds from the same domain.

No comments posted yet

Add Comment