Friday, October 7, 2011

scroll(Function)

scroll(Function fn) returns jQuery
Bind a function to the scroll event of each matched element.

Example:

$("p").scroll( function() { alert("Hello"); } );

HTML:
<p>Hello</p>

Result:
<p onscroll="alert('Hello');">Hello</p>

No comments:

Post a Comment