JSignage:RSSTutorial1
From SpinetiX Support Wiki
Description
Simple text ticker
- There are three main ways to display information from an RSS feed:
- the text ticker
- the text bar
- the slideshows
- We will start by building a simple text ticker with the headlines.
Source code
var uri = 'http://download.spinetix.com/content/jSignage/tutorial/media/science.rss';
$.get( uri, function( rssFeed ) {
// Parse the feed into an array of news items. Each one is an object with a title and a description property.
// You can supply your own custom parser here if the data source is not RSS formatted.
var rss = $.parseRSS( rssFeed );
$.textTicker({
top: '80%',
height: '15%',
frame: { backColor: '#0000FF', backOpacity: 0.5 },
data: rss,
spacing: 50,
fill: 'white',
renderToText: function() {
return this.title;
},
repeatCount: 'indefinite'
}).addTo('svg');
}, 'text' );