Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (33 sloc) 1.06 KB


slideSpeed allows you to control elements sliding up or down with a set speed rather than a timing. This means taller elements take longer to slide - more representative of their size.

The speed is in pixels per second - best bet is to have a play around and see what you prefer.

This plugin is used instead of jQuery's .slideDown(), .slideUp() or .slideToggle()

for example:


The slideSpeed() plugin can take 3 parameters:

    speed: 500, //the speed
    slide: 'down', //can be up, down or toggle.
    callback: function(){} // gets fired once the element has done its thing

The values listed in the example above are the defaults for the plugin.

TO give you an idea of speed and time, the following results were conducted

For a div with a height of 600px - I achieved the following results:

Speed (pixels per second) Time (ms)
200 3000
500 1200
800 800