jQuery scroll() Method
jQuery scroll() Method
The scroll event is used to occur when the user scrolls in the specified element. It works for all scrollable elements and the window object. The scroll() method triggered the scroll event. We can attach a function to run when a scroll event occurs.
Syntax:-
Its syntax is:- $(selector).scroll(function)
Further Explanation:-
Parameter | Description |
---|---|
function | Optional. Specifies the function to run when the scroll event is triggered |