Skip to content

olahol/scrollparent.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrollparent.js

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

browser support

Install

npm install scrollparent --save

Example

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

License

MIT