I need to make some changes to this news ticker which is based on goldyberg’s jquery horizontal newsticker using Google JSAPI:
http://inetwebdesign.com/jQueryTools/tickers/horizontal-news-ticker2/horizontal-news-ticker3.html
I have two questions:
-
How do you limit the number of words that are being pulled into the div? Right now it is too long and it wraps.
-
How do you add the date from the rss feed to the string that is displayed?
Here is the code I believe is relevant:
parse: function(entries) {
var feedMarkup = '';
feedMarkup += '<ul>';
for (var i = 0; i < entries.length; i++) {
feedMarkup += '<li><a target="_blank"
href="'+entries[i].link+'">'+entries[i].title+'</a></li>';
}
feedMarkup += '</ul>';
$("#ticker-content").empty().append(feedMarkup).fadeIn(400);
$('#ticker ul
li:eq(0)').show();
current = $('#ticker ul li:eq(0)').index();
first = 0;
last = $('#ticker ul li').length;
Thanks in advance for your help.
Regards,
umbre
A demo is here: http://www.marlenynunez.com/files/jsapi/horizontal-news-ticker4.html
HTML file:
scripts.js file: