Submit your widget

Slideshow Script – TinySlider

Created 14 years ago   Views 11804   downloads 2901    Author n/a
Slideshow Script – TinySlider
View DemoDownload
101
Share |

This super lightweight (1.5KB) and standalone sliding slideshow script can easily be customized to integrate with any website through CSS. You can add any content to it, not just images, and it gracefully degrades without JavaScript support. The script supports automatic rotation with the option to auto-resume, an active class on a navigation list if applicable, and a direction toggle (vertical or horizontal).

 

To initialize the script use the following:

var slideshow=new TINY.slider.slide('slideshow',{
 id:'slider', // ID of the parent slideshow div
 auto:3, // Seconds to auto-advance, defaults to disabled
 resume:true, // Resume auto after interrupted, defaults to false
 vertical:false, // Direction, defaults to false
 navid:'pagination', // Optional ID of direct navigation UL
 activeclass:'current', // Class to set on the current LI
 position:0 // Initial slide position, defaulting to index 0
});

 

The first parameter taken by TINY.slider.slide is the variable name used for the object instance. You can also optionally set width and height parameters for the applicable direction you are sliding. If it is not set the width or height will be automatically calculated using the offsetWidth/offsetHeight of the first list element. This script has been tested in all major browsers and is available free of charge for both personal or commercial projects under the creative commons license. Community support is available here. Paid support is also available, contact me for details.