Skip to content

Loop and Pause features#11

Open
Lachee wants to merge 1 commit intoBenjaminRH:masterfrom
Lachee:master
Open

Loop and Pause features#11
Lachee wants to merge 1 commit intoBenjaminRH:masterfrom
Lachee:master

Conversation

@Lachee
Copy link

@Lachee Lachee commented Jun 9, 2019

Added onAdvanceLooped option to hook when the headers loop back around.
Made it so the pause class will also pause the ticker (instead of just the hover).

Example of Loop

$('.ticker').ticker({
                itemSpeed: itemSpeed,
                onAdvanceLooped: function() { 
                    if (!has_swapped)
                    {
                        setTimeout(nextOperator, itemSpeed);
                        has_swapped = true;
                    }
                },
            });

Example of pause

$(prev).find('.ticker').addClass('pause');

Added onAdvanceLooped option to hook when the headers loop  back around.
Made it so the `pause` class will also pause the ticker (instead of just the hover).

Example of Loop
```js
$('.ticker').ticker({
                itemSpeed: itemSpeed,
                onAdvanceLooped: function() { 
                    if (!has_swapped)
                    {
                        setTimeout(nextOperator, itemSpeed);
                        has_swapped = true;
                    }
                },
            });
```


Example of pause
```js
$(prev).find('.ticker').addClass('pause');
```
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

Successfully merging this pull request may close these issues.

1 participant