
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
scroll-to-element
Advanced tools
Smooth scrolls to element of the specified selector or element reference with optional offset, scroll-positon, easing, and duration. Takes into account document height for elements low on the page.
scrollToElement(selector, <options>)
Add an additional offset to the final position. if > 0 then page is moved to the bottom otherwise the page is moved to the top.
Alignment of the element in the resulting viewport. Can be one of
'top'
,'middle'
or'bottom'
. Defaulting to'top'
.
Easing function defaulting to "out-circ" (view ease for more)
Animation duration defaulting to
1000
var scrollToElement = require('scroll-to-element');
scrollToElement('#id');
// with options
scrollToElement('.className', {
offset: 0,
ease: 'out-bounce',
duration: 1500
});
// or if you already have a reference to the element
var elem = document.querySelector('.className');
scrollToElement(elem, {
offset: 0,
ease: 'out-bounce',
duration: 1500
});
MIT
FAQs
Smooth scrolling to an element via selector or node reference
The npm package scroll-to-element receives a total of 32,366 weekly downloads. As such, scroll-to-element popularity was classified as popular.
We found that scroll-to-element demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.