Skip to content

Shortens duration after hover to keep the same speed. #1

Description

@mikaelmattsson

The animation is applied after a hover with the same duration, even if the process was half way done. This results in a slower speed on the marquee until the next animation loop.

Replace...
animation = obj.animate({left: '-'+goto+'px'},settings.speed,'linear',function(){

with...
var animationProcess = 1 + ( obj.position().left / goto);
animation = obj.animate({left: '-'+goto+'px'},settings.speed * animationProcess,'linear',function(){

...to fix the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions