All Projects â†’ olahol â†’ scrollparent.js

olahol / scrollparent.js

Licence: MIT License
A function to get the scrolling parent of an html element.

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to scrollparent.js

React Scroll Sync
Synced scroll position across multiple scrollable elements
Stars: ✭ 252 (+394.12%)
Mutual labels:  dom, scroll
react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (+147.06%)
Mutual labels:  scrolling, scroll
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: ✭ 17 (-66.67%)
Mutual labels:  scrolling, scroll
Moveto
A lightweight scroll animation javascript library without any dependency
Stars: ✭ 2,746 (+5284.31%)
Mutual labels:  scrolling, scroll
really-smooth-scroll
A script that smoothen scrolling in the browser
Stars: ✭ 21 (-58.82%)
Mutual labels:  scrolling, scroll
Scrollmonitor
A simple and fast API to monitor elements as you scroll
Stars: ✭ 3,250 (+6272.55%)
Mutual labels:  dom, scroll
render-props
㸚 Easy-to-use React state containers which utilize the render props (function as child) pattern
Stars: ✭ 33 (-35.29%)
Mutual labels:  dom, scrolling
Scroll Snap
↯ Snap page when user stops scrolling, with a customizable configuration and a consistent cross browser behaviour
Stars: ✭ 187 (+266.67%)
Mutual labels:  scrolling, scroll
react-smart-scroll
Efficient rendering of long lists in React
Stars: ✭ 27 (-47.06%)
Mutual labels:  scrolling, scroll
NoobScroll
A lightweight jQuery Plugin that add some cool function to make scrolling more fun [Archive]
Stars: ✭ 43 (-15.69%)
Mutual labels:  scrolling, scroll
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: ✭ 216 (+323.53%)
Mutual labels:  scrolling, scroll
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (-52.94%)
Mutual labels:  scrolling, scroll
Stickyfill
Polyfill for CSS `position: sticky`
Stars: ✭ 2,252 (+4315.69%)
Mutual labels:  scrolling, scroll
Motus
Animation library that mimics CSS keyframes when scrolling.
Stars: ✭ 502 (+884.31%)
Mutual labels:  dom, scroll
React Indiana Drag Scroll
React component which implements scrolling via holding the mouse button or touch
Stars: ✭ 190 (+272.55%)
Mutual labels:  scrolling, scroll
scroll-sync-react
A scroll syncing library for react that is up to date
Stars: ✭ 49 (-3.92%)
Mutual labels:  scrolling, scroll
Scroll Js
Light cross-browser scroller that uses native javascript
Stars: ✭ 179 (+250.98%)
Mutual labels:  scrolling, scroll
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (+258.82%)
Mutual labels:  scrolling, scroll
onscroll-effect
A tiny JavaScript library to enable CSS animations when user scrolls.
Stars: ✭ 35 (-31.37%)
Mutual labels:  scrolling, scroll
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: ✭ 38 (-25.49%)
Mutual labels:  scrolling, scroll

scrollparent.js

A function to get the scrolling parent of an html element.

Install

npm install scrollparent --save

Example

var Scrollparent = require("scrollparent");

Scrollparent(document.getElementById("content")) // HTMLHtmlElement or HTMLBodyElement as appropriate
var Scrollparent = require("scrollparent");

Scrollparent(document.getElementById("inside-a-scrolling-div")) // HTMLDivElement

Note about the root scrolling element

Internally, the root scrolling element is determined in this library as the result of

document.scrollingElement || document.documentElement;

This should give a usable result in most browsers today but if you want to ensure full support you should use a document.scrollingElement polyfill such as this one.

Contributors

  • Ola Holmström (@olahol)
  • Bart Nagel (@tremby)
  • Daniel White (@danbrianwhite)

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].