.scrollParent()

jQuery

.scrollParent()


.scrollParent() Returns: jQuery

Description: Get the closest ancestor element that is scrollable.

  • .scrollParent()

    • This method does not accept any arguments.

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.