question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Velocity "scroll" doesn't work

See original GitHub issue

I installed “velocity-animate”: “^2.0.1” And I use it like below within Vue component.

import Velocity from 'velocity-animate';
...
var d = document.getElementsByClassName("chat-wrapper");
Velocity(d[0], "scroll", { duration: 500 });
...

But I get error in console. Uncaught (in promise) Error: Velocity: First argument (scroll) was not a property map, a known action, or a registered redirect. Aborting.

I couldn’t find solution. Please help me! (FYI, I confirmed the dom element - d[0] exists.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

6reactions
Rycochetcommented, Feb 22, 2018

Scroll is now a property, but I’m not 100% happy with the internal code for it, so it’s not listed in the wiki (current docs) yet. I’m going to point you at my StackOverflow answer and copy the example from it - https://stackoverflow.com/a/48847153/3328079

$("#container").velocity({
   scrollTop: "500px"
}, {
   duration: 500
});

If you want to scroll to a specific element then you’ll need to find its offset - there will be a decent example of this once I get the time to do it.

0reactions
joelucky39commented, Oct 18, 2019

I’m having to use jQuery because Velocity scroll does not work in vue.js with Laravel

Read more comments on GitHub >

github_iconTop Results From Across the Web

velocity("scroll") does not work properly if used inside a ...
Alright I found the solution from jQuery itself. Instead of just calling the function like this : $(window).scroll(function(){ if($(window).
Read more >
Mouse Scroll Too Slow or Fast? How to Fix It in Windows 10
To change the vertical scroll speed of your mouse: Press Windows key + I to open Settings. Click Devices. Click Mouse. Use the...
Read more >
How to Fix Mouse Scroll & Speed Issues In Windows PC ...
Windows 10 & Computer (Tips, Tricks & Troubleshoots). How to Fix Mouse Scroll & Speed Issues In Windows PC (Change Default Setting).
Read more >
Mouse scroll number of lines setting doesn't change trackpad
Hello. I am using a new HP envy 13, and am trying to change the scroll speed settings of the trackpad. I have...
Read more >
521211 - Linux scroll speed is too low - chromium - Monorail
Windows scroll speed in Chrome is about double that of Linux. ... I don't understand the exact way scrolling works on both Linux...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found