jquery-advanced-news-ticker icon indicating copy to clipboard operation
jquery-advanced-news-ticker copied to clipboard

Disable Infinite Loop?

Open agndesigns opened this issue 10 years ago • 1 comments

Wonderful script. I just need a little help.

I've been unable to figure this out with the documentation... is there any way to remove the infinite scroll? For example: if there's only five items on the ticker, it stops scrolling after five and doesn't loop back to number one.

Is this possible?

agndesigns avatar Apr 30 '15 07:04 agndesigns

What I did..

      var moved = 0
      var checkIfMovedFive = function() {
        if (moved == 6)
          expertFeed.newsTicker('stop');
        else
          moved += 1;
      };
      var expertFeed = $('.expert-feed').newsTicker({
        row_height: 60,
        max_rows: 1,
        duration: 3000,
        pauseOnHover: 0,
        hasMoved: checkIfMovedFive
      });

gotoAndBliss avatar Jul 16 '17 13:07 gotoAndBliss