Skip to content

Commit b769cee

Browse files
committed
Added description
1 parent 4404e82 commit b769cee

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.rdoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
= jQuery.scrollIntoView
2+
3+
author:: Arwid Bancewicz http://arwid.ca
4+
version:: 0.1
5+
updated:: 8 May 2011
6+
7+
Similar to the default browser scrollIntoView, this jQuery plugin scrolls an element into view to the top or bottom of its container but not if it's already visible.
8+
9+
= Usage
10+
An animated scroll:
11+
$("#some_element").scrollIntoView();
12+
13+
No animation:
14+
$("#some_element").scrollIntoView(false);
15+
16+
Configure the animation (same options as in jQuery animate()):
17+
$("#some_element").scrollIntoView(250, "easeOutExpo", function() { alert("done scroll!") });
18+
19+
$("#some_element").scrollIntoView({
20+
duration: true,
21+
easing:'easeOutExpo',
22+
complete: $.noop(),
23+
step: $.noop(),
24+
queue: false,
25+
specialEasing: null
26+
});
27+
28+
* Refer to http://api.jquery.com/animate/ for a description of the options.
29+
* By default the animation easing will be 'easeOutExpo' if jQuery UI Effects is included before this file. Otherwise, it'll use jQuery's default 'swing' easing which isn't great. So make sure to download Effects Core from http://jqueryui.com/download and include it before this file for a better animation.
30+
31+
= License
32+
33+
jQuery.scrollIntoView is covered by the MIT License.

0 commit comments

Comments
 (0)