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

Disable Infinite Loop? #28

Open agndesigns opened 9 years ago

agndesigns commented 9 years ago

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?

gotoAndBliss commented 7 years ago

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
      });