Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

sneaknz/simpleslider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Slider plugin

A jQuery plugin to create a slider out of an unordered list (or other items within a container). See an example at http://code.sneak.co.nz/simpleslider/.

Usage

Call the plugin on the parent element of the list/group. This doesn't have to be an unordered list, so long as all direct children of the parent are items belonging to the list or group.

$('.slider').simpleSlider({
	show: 3,
	interval: 3,
	size: 590,
	orientation: 'horizontal',
	clickevent: function(){
		$(this).parent().find('li').stop().css({ opacity : 1 });
		$(this).stop().css({ opacity : 0.4 });
		return false;
	}
});

Options

show Optional, Int. How many items will be shown at once (default is 4)
interval Optional, Int. How many items to be scrolled on each prev/next click (default is 1)
children Optional, String. Child elements that will make up the slider items (default is 'li')
speed Optional, Int. Speed of animations, in milliseconds (default is 250)
prevlabel Optional, String. Label for previous sroll button (default is 'Prev')
nextlabel Optional, String. Label for next sroll button (default is 'Next')
size Optional, Int. Size dimension, used for width or height depending on orientation
orientation Optional, String. Orientation of the slider. Options are horizontal or vertical (default is 'horizontal')
clickevent Optional, Function. Callback for items when they are clicked. The clicked item is passed in with the callback.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published