The scroll() is an inbuilt method in jQuery which is used to user scroll in the specified element. This method works for all scrollable elements and the browser window.
Parameter: This method accepts single parameters function which is optional. It is used to specify the function to run when the scroll event is triggered.
Return Value: It binds an event when scroll is happen for the specified element.
Below program illustrates the scroll() method in jQuery:
After scrolling inside the div box.
- How to scroll window using jQuery ?
- How to scroll automatically to a particular element using JQuery?
- How to scroll to specific element using jQuery ?
- How to scroll the page up or down using anchor element in jQuery ?
- How to change style of elements on scroll using jQuery ?
- How to scroll automatically to the Bottom of the Page using jQuery?
- How to determine the direction of a jQuery scroll event?
- jQuery | after() with Examples
- jQuery | on() with Examples
- jQuery | one() with Examples
- jQuery | val() with Examples
- jQuery | last() with Examples
- jQuery | eq() with Examples
- jQuery | first() with Examples
- jQuery | has() with Examples
- jQuery | wrapAll() with Examples
- jQuery | fadeTo() with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.