I am making a news app, and I am using a jQuery plugin called zRSSFeed. The plugin comes with a feature to change the RSS feed displayed by selecting a news source from a dropdown, which would alter the feed showing in the result Div (see example here).
Source code :
<script src="http://jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="jquery.zrssfeed.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
setRSSFeed('#menu');
$('#menu').change(function() {
setRSSFeed(this)
});
function setRSSFeed(obj) {
var feedurl = $('option:selected', obj).val();
if (feedurl) {
$('#result').rssfeed(feedurl);
}
}
});
</script>
<select id="menu">
<optionvalue="http://feeds.reuters.com/reuters/oddlyEnoughNews">News</option>
<option value="http://feeds.bbc.co.uk/iplayer/highlights/tv/list">BBC </option>
<option value="http://rss.cnn.com/rss/edition.rss">CNN News</option>
</select>
<div id="result"></div>
My problem is that instead of changing the feed displayed by selecting a newsource from the dropdown, I would love to change them by selecting a link (href) with a specified new source.
Instead of using this
Use this