W3cubDocs

/jQuery UI

.scrollParent()

.scrollParent()Returns: jQuery

Description: Get the closest ancestor element that is scrollable.

This method finds the nearest ancestor that allows scrolling. In other words, the .scrollParent() method finds the element that the currently selected element will scroll within.

Note: This method only works on jQuery objects containing one element.

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jqueryui.com/scrollParent