1.0.3 • Published 9 years ago

can-scroll v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

can-scroll

Return the number of pixels an element can be scrolled by in all directions

usage

canScroll(element) will recurse up the DOM tree of an element and add up the scrollable distance on all of its offsetParents

canScroll(someElement);

// -> {up: 10, down: 20, left: 0, right: 0}

If you only care about the scrollability of the target element, you can use canScroll.canScrollSelf(element), which does not recurse.

1.0.3

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago