AutoScroll for jQuery

Here's a small jQuery plugin I wrote that allows for hotspot scrolling of web pages.

Demo

Click here to view a demo

Download

Requirements

You'll need a copy of the excellent jQuery. This plugin will work with pre-1.0 versions.

It is possibly through slight modifications to use this standalone, but I'll leave the details up to you.

Init Attributes

  • interval: Number of milliseconds for the step function, defaults to 80
  • mod_key: Key code to activate scrolling, defaults to 17 (Control key)
  • step: Maximum number of pixels to scroll. Will be weighted by how far the mouse is in the 'trigger' zone
  • trigger: Number of pixels from the edge of the browser viewport to start scrolling if the mod_key is held down

Example

Basic usage:

$.autoscroll.init();

Setting options:

var opts = {	step: 100,
		trigger: 100
		};
$.autoscroll.init(opts);

Feedback

If you'd like to email me, you may do so at jdsharp at the place called gmail which is a dot com.