jQuery Tutorial Tutorials - jQuery .scroll() method

jQuery .scroll() method

The .scroll() method in jQuery is used to bind an evnet handler to the "scroll" event or trigger the "scroll" event on an element.

jQuery .scroll() method Syntax

.scroll(handler)
.scroll([eventData],handler)
.scroll()

.scroll() is equivalent to .trigger( "scroll" )

jQuery .scroll() method Example

example

Execute a function when the page is scrolled:

$(window).scroll( function() { /* ...do something... */ } );
Date:2019-08-28 10:32:38 From:www.Lautturi.com author:Lautturi