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

window.scrollTop #880

Open
incompletude opened this issue Jun 25, 2018 · 1 comment
Open

window.scrollTop #880

incompletude opened this issue Jun 25, 2018 · 1 comment

Comments

@incompletude
Copy link

incompletude commented Jun 25, 2018

Your system information

  • VelocityJS version: 2.0.5

I'm trying to animate the window.scrollTop using velocity v2. The code below doesn't work. Is there an interface to accomplish this?

    window.velocity(
        { scrollTop: "0px" },
        {
            duration: 800,
            delay: 500
        }
    );

I'm trying this, but it also doesn't work.

        var dummy = document.createElement("p");

        dummy.velocity(
            {
                tween: [0, 1000]
            },
            {
                progress: function(
                    elements,
                    percentComplete,
                    remaining,
                    tweenValue,
                    activeCall
                ) {
                    console.log("The current tween value is " + tweenValue);
                }
            }
        );
@virzak
Copy link

virzak commented Oct 12, 2020

I'm having the same issue.

velocity(document.body, { scrollTop: scrollDist }, 5000, 'swing');

scrolling occurs immediately, without animation

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