diff --git a/includes/jquery.ticker.js b/includes/jquery.ticker.js index 96799e8..0a1dadd 100755 --- a/includes/jquery.ticker.js +++ b/includes/jquery.ticker.js @@ -12,416 +12,430 @@ along with jQuery News Ticker. If not, see . */ (function($){ - $.fn.ticker = function(options) { - // Extend our default options with those provided. - // Note that the first arg to extend is an empty object - - // this is to keep from overriding our "defaults" object. - var opts = $.extend({}, $.fn.ticker.defaults, options); + $.fn.ticker = function(options) { + // Extend our default options with those provided. + // Note that the first arg to extend is an empty object - + // this is to keep from overriding our "defaults" object. + var opts = $.extend({}, $.fn.ticker.defaults, options); - // check that the passed element is actually in the DOM - if ($(this).length == 0) { - if (window.console && window.console.log) { - window.console.log('Element does not exist in DOM!'); - } - else { - alert('Element does not exist in DOM!'); - } - return false; - } + // check that the passed element is actually in the DOM + if ($(this).length == 0) { + if (window.console && window.console.log) { + window.console.log('Element does not exist in DOM!'); + } + else { + alert('Element does not exist in DOM!'); + } + return false; + } - /* Get the id of the UL to get our news content from */ - var newsID = '#' + $(this).attr('id'); + /* Get the id of the UL to get our news content from */ + var newsID = '#' + $(this).attr('id'); - /* Get the tag type - we will check this later to makde sure it is a UL tag */ - var tagType = $(this).get(0).tagName; + /* Get the tag type - we will check this later to makde sure it is a UL tag */ + var tagType = $(this).get(0).tagName; - return this.each(function() { - // get a unique id for this ticker - var uniqID = getUniqID(); + return this.each(function() { + // get a unique id for this ticker + var uniqID = getUniqID(); - /* Internal vars */ - var settings = { - position: 0, - time: 0, - distance: 0, - newsArr: {}, - play: true, - paused: false, - contentLoaded: false, - dom: { - contentID: '#ticker-content-' + uniqID, - titleID: '#ticker-title-' + uniqID, - titleElem: '#ticker-title-' + uniqID + ' SPAN', - tickerID : '#ticker-' + uniqID, - wrapperID: '#ticker-wrapper-' + uniqID, - revealID: '#ticker-swipe-' + uniqID, - revealElem: '#ticker-swipe-' + uniqID + ' SPAN', - controlsID: '#ticker-controls-' + uniqID, - prevID: '#prev-' + uniqID, - nextID: '#next-' + uniqID, - playPauseID: '#play-pause-' + uniqID - } - }; + /* Internal vars */ + var settings = { + position: 0, + time: 0, + distance: 0, + newsArr: {}, + play: true, + paused: false, + contentLoaded: false, + dom: { + contentID: '#ticker-content-' + uniqID, + titleID: '#ticker-title-' + uniqID, + titleElem: '#ticker-title-' + uniqID + ' SPAN', + tickerID : '#ticker-' + uniqID, + wrapperID: '#ticker-wrapper-' + uniqID, + revealID: '#ticker-swipe-' + uniqID, + revealElem: '#ticker-swipe-' + uniqID + ' SPAN', + controlsID: '#ticker-controls-' + uniqID, + prevID: '#prev-' + uniqID, + nextID: '#next-' + uniqID, + playPauseID: '#play-pause-' + uniqID + } + }; - // if we are not using a UL, display an error message and stop any further execution - if (tagType != 'UL' && tagType != 'OL' && opts.htmlFeed === true) { - debugError('Cannot use <' + tagType.toLowerCase() + '> type of element for this plugin - must of type