Reputation: 1001
Please how can I change the feed URL in this script with link(href)
<script type="text/javascript">
$(document).ready(function () {
$('#test').rssfeed('http://feeds.reuters.com/reuters/oddlyEnoughNews');
});
</script>
<div id="test"> </div>
See example here http://www.zazar.net/developers/jquery/zrssfeed/example.html
The test Div displays the content of the rss feed
I just want to be able to alter the rssfeed(url)
by clicking links with diffrent rssfeed url
<a onclick ="rssfeed('http://feeds.cnn.com/News');"></a>
Upvotes: 1
Views: 147
Reputation: 6771
As it is shown here: http://www.zazar.net/developers/jquery/zrssfeed/example_menu.html
One can simply change the feed by calling .rssfeed
again.
Upvotes: 0
Reputation: 2559
note sure how you'd want the link to load it, but I'm assuming on click so this is what I would do..
<script type="text/javascript"> $(document).ready(function () { $('.rss').click(function(){ $('#test').rssfeed($(this).attr('href')); }) }); </script> <a class="rss" href="http://feeds.reuters.com/reuters/oddlyEnoughNews">load rss</a> <div id="test"> </div>
Upvotes: 1