Skip to content

This project provided a easy-used carousel plugin.

Notifications You must be signed in to change notification settings

hi-sunshine/carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carousel


This project provided a easy-used carousel plugin.

Usage

  1. Import the bupt.carousel.css and bupt.carousel.jsinto your page.
<link type="text/css" rel="stylesheet" href="bupt.carousel.css" />
<script type="text/javascript" src="bupt.carousel.js"></script>
  1. Use the carousel like follow.
  <div id="container"></div>
  <script type="text/javascript">
	var imgs = ['./imgs/1.jpg', './imgs/2.jpg', './imgs/3.jpg', './imgs/4.jpg', './imgs/5.jpg'];
	var params = {
		width: '700px',              //the width of container div
		height: '500px',             //the height of container div
		imgs:imgs,                   //the array of images url
		interval: 300                //control the switching effect, the speed of image slide to next one, value(300-1000, unit: ms)
	};
	carousel.init("container", params);
  </script>

Example

example.html provided an complete example of this carousel plugin.

About

This project provided a easy-used carousel plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published