| |||||
The plugin will allow the developer to animate and move the viewport anywhere he needs it.
jQuery.LocalScroll and jQuery.SerialScroll where evolved from this plugin.
There are many different ways to specify the target position. These are:
- A raw number
- A string('44', '100px', '+=30px', etc )
- A DOM element (logically, child of the scrollable element)
- A selector, that will be relative to the scrollable element
- The string 'max' to scroll to the end.
- A string specifying a percentage to scroll to that part of the container (f.e: 50% goes to to the middle).
- A hash { top:x, left:y }, x and y can be any kind of number/string like above.
Here are some key features of "jQuery.ScrollTo":
Animation settings:
· axis: Axes to be scrolled, 'x', 'y', 'xy' or 'yx'. 'xy' is the default.
· duration: Length of the animation, none (sync) by default.
· easing: Name of the easing equation.
· margin: If true, target's border and margin are deducted.
· offset: Number or hash {left: x, top:y }. This will be added to the final position(can be negative).
· over: Add a fraction of the element's height/width (can also be negative).
· queue: If true and both axes are scrolled, it will animate on one axis, and then on the other. Note that 'axis' being 'xy' or 'yx', concludes the order
· onAfterFirst: If queing, a function to be called after scrolling the first axis.
· onAfter: A function to be called after the whole animation ended.
Requirements:
· JavaScript enabled on client side
· jQuery
What's New in This Release: [ read full changelog ]
· Fixed passing a negative scroll value crashes.

Via: jQuery.ScrollTo 1.4.5






0 Comment:
Post a Comment