V Neal
V Neal

Reputation: 419

jQuery ticker - how to remove #ticker-title

hoping someone can help.

I'm using jQuery's ticker plugin to display news headlines.

I need to be able to remove the title element 'titleElem' from the js (the text 'Latest news' is added via the JS so has no benefit for SEO), ideally the text needs to be physically on the page.

I've tried hiding the title using

$(function() { $('#ticker-title span').css("display", "none");  });

Upvotes: 0

Views: 3722

Answers (1)

JAiro
JAiro

Reputation: 6009

You have to SET IT AS AN EMPTY STRING... Look

$(function () {
  $('#js-news').ticker(
    speed: 0.10,           // The speed of the reveal
    ajaxFeed: false,       // Populate jQuery News Ticker via a feed
    feedUrl: false,        // The URL of the feed
                       // MUST BE ON THE SAME DOMAIN AS THE TICKER
    feedType: 'xml',       // Currently only XML
    htmlFeed: true,        // Populate jQuery News Ticker via HTML
    debugMode: true,       // Show some helpful errors in the console or as alerts
                       // SHOULD BE SET TO FALSE FOR PRODUCTION SITES!
    controls: true,        // Whether or not to show the jQuery News Ticker controls
    titleText: 'Latest',   // To remove the title set this to an empty String
    displayType: 'reveal', // Animation type - current options are 'reveal' or 'fade'
    direction: 'ltr'       // Ticker direction - current options are 'ltr' or 'rtl'
    pauseOnItems: 2000,    // The pause on a news item before being replaced
    fadeInSpeed: 600,      // Speed of fade in animation
    fadeOutSpeed: 300      // Speed of fade out animation
);

});

Upvotes: 1

Related Questions