I’m trying to make a gadget with “FeedEk jQuery”
but problem is i cant add auto update feed in that code! for example i wanna change and reload feeds every 5 minutes.
Source: http://www.jquery-plugins.net/FeedEK/FeedEK.html
Default Function:
<script type="text/javascript" >
$(document).ready(function(){
$('#divRss').FeedEk({
FeedUrl : 'http://www.my site.ir/rss.xml',
MaxCount : 5,
ShowDesc : false,
ShowPubDate: true
});
});
</script>
HTML:
<div id="divRss"></div>
My question is, how i can add auto update or refresh timer for every 5 mins on this jquery code?
And next question is, how i can add word limit for description, for example just 200 word in description.
to explain what I meant in the comment, take the above and wrap it in a function (we’ll call it
loadFeed():Next, just after it make a direct call to that function so it executed on page load:
Then, place a recurring call (using
setInterval) just below that so it updates:So, altogether:
Regarding your second question, you’re probably going to need to open the script and modify the
entry.contentportion within the$.ajaxcall so it only shows as much information as you want. If it’s minified (all one line) you can use jsBeautifier to make it a little easier to read and work with.