risq / jquery-advanced-news-ticker

(deprecated) - A powerful, flexible and animated vertical news ticker plugin for JQuery.
http://risq.github.io/jquery-advanced-news-ticker
GNU General Public License v2.0
297 stars 104 forks source link

Solution to display first item with appropriate content from BD with demo#2 #33

Closed lenamtl closed 8 years ago

lenamtl commented 8 years ago

From http://risq.github.io/jquery-advanced-news-ticker/ I'm using Example 2

The problem is the first news title appear once and content appear twice in the code. I'm using DB data to filled the news, so the first news title don't have the appropriate content.

lenamtl commented 8 years ago

Just add this to the script part.

$(function() { 
        $('#nt-example2-infos .infos-hour').text($('#nt-example2 li:first span').text());
        $('#nt-example2-infos .infos-text').text($('#nt-example2 li:first').data('infos'));
    });