.scrollTop()


.scrollTop()Возвращает: Number

Описание: Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.

  • Добавлен в версии: 1.2.6.scrollTop()

    • This method does not accept any arguments.

The vertical scroll position is the same as the number of pixels that are hidden from view above the scrollable area. If the scroll bar is at the very top, or if the element is not scrollable, this number will be 0.

Примеры использования

.scrollTop( value )Возвращает: jQuery

Описание: Set the current vertical position of the scroll bar for each of the set of matched elements.

The vertical scroll position is the same as the number of pixels that are hidden from view above the scrollable area. Setting the scrollTop positions the vertical scroll of each matched element.

Примеры использования