jQuery.aautoscroll

Summary

Autoscroll provides the capability to scroll any scrollable element in any direction and provides a number of methods to manipulate the scrolling. It includes a pause on hover and the ability to add other elements as pause on hover triggers.

Follow this project @ plugins.jquery.com

View a demonstration

Defaults

$.fn.autoscroll.defaults = { 
    settings: { step: 50, scroll: true, direction: "down" }, 
    delay: 5000, 
    ffrw: { speed: "fast", step: 100 } 
};

Methods

[default]

$("scrollable").autoscroll([settings]);

    settings
  • direction: Direction accepts a number of different formats. Each format is eventually evaluated as an angle from 0 to 360 on a standard Cartesian scale.
    • unit signed or unsigned number evaluated as degrees.
    • string up|down|left|right|upleft|upright|downleft|downright
    • unitrad signed or unsigned number ending with the letters rad evaluated in radians
  • step: Step accepts a signed or unsigned number. It is evaluated as the number of pixels traversed over 1 second. Defaults to 50
  • scroll: true or false to initialize scrolling action as paused or not.

destroy

$("scrollable").autoscroll("destroy");

Stops any scrolling and destroys the autoscroller

pause

$("scrollable").autoscroll("pause");

Stops scrolling

resume

$("scrollable").autoscroll("resume");

Resumes scrolling

toggle

$("scrollable").autoscroll("toggle");

Toggles between pause and resume.

fastforward or rewind

$("scrollable").autoscroll("fastforward", [settings]);
$("scrollable").autoscroll("rewind", [settings]);

    settings
  • step: Step accepts a signed or unsigned number. It is evaluated as the number of pixels traversed over 1 second. Defaults to 100
  • speed: fast, slow or a unit indicating milliseconds

Advances or rewinds the scrolling while maintaining the current scrolling actions.

reverse

$("scrollable").autoscroll("reverse");

Reverses the scrolling direction by 180 degrees.

addpausesource

$("scrollable").autoscroll("addpausesource", value);

adds the passed in value (dom element, jQuery object or jQuery selector) as pause on hover triggers.

delay

$("scrollable").autoscroll("delay", [time]);

Pauses the scrolling for the specified time. Defaults to 5000 milliseconds

ċ
jquery.aautoscroll.js
(7k)
Daniel Gidman,
Sep 22, 2010, 6:33 AM
Comments