Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Infinite Loop? #28

Open
agndesigns opened this issue Apr 30, 2015 · 1 comment
Open

Disable Infinite Loop? #28

agndesigns opened this issue Apr 30, 2015 · 1 comment

Comments

@agndesigns
Copy link

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
Copy link

gotoAndBliss commented Jul 16, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants