zRSSFeed - Selecting RSS feeds from a menu

This example shows loading feeds dynamically by selecting a feed from a list of options.

Script

$(document).ready(function() {

	setRSSFeed('#menu');	

	$('#menu').change(function() {
		setRSSFeed(this)
	});

	function setRSSFeed(obj) {
		var feedurl = $('option:selected', obj).val();
		
		if (feedurl) {
			$('#test').rssfeed(feedurl);
		}
	}
});

Select a feed from the list below

Result