Skip to content

johnathanmiller/stackd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stackd.js Slider

Demo

HTML

<ul id="stackd">
	<li></li>
	<li></li>
	<li></li>
	<li></li>
	<li></li>
</ul>

Integration

<script src="./stackd.min.js"></script>
<script>
	let stackd = new Stackd({
		// options here
	});
	stackd.init();
</script>

Options

option description default
id id name for slider container "stackd"
controls displays previous/next buttons for slider true
keyboard allows ← → keyboard keys to alternate slides false
offset offset of each visible slide 15
visible number of visible slides 3
previousButtonContent html/text inside previous button "&larr;"
nextButtonContent html/text inside next button "&rarr;"

Todo

  • Support for multiple sliders
  • Keyboard left/right controls
  • Option to change offset direction
  • Option to change visible slide count
  • Auto rotate and speed setting
  • Support integration as jQuery plugin