Giter Site home page Giter Site logo

jquery-carousel's Introduction

The jQuery carousel plugin

A jQuery plugin to create a carousel. Extremely lightweight (< 2kb), easily customizable using CSS.

Screenshot

Screenshot

Usage

Add the following html to your page:

<div id="carousel" class="dcCarousel">
	<div class="items">
		<div rel="1" class="item">
			Item 1
		</div>
		<div rel="2" class="item">
			Item 2
		</div>
		etc...
	</div>	
	<div class="carousel-holder">
		<a href="#" class="arrowl">&lt;</a>
		<div class="holder">
			<ul>
				<li class="selected"><a href="#">1</a></li>
				<li><a href="#">2</a></li>
				etc...					
			</ul>
		</div>
		<a href="#" class="arrowr">&gt;</a>
	</div>
	<div class="padder">
		<div class="outer-center">
			<ul class="controls inner-center"></ul>
			<div style="clear: both;"></div>
		</div>
	</div>
</div>

Obviously the etc... is there indicating that you should add further items

Add this to your $(document).ready function:

$("#carousel").carousel();

Or with options:

$("#carousel").carousel({showPager: false});

Options

perpage The number of items to display per page on the carousel

width The width in pixels of the carousel container

showPager Whether the paging dots should be shown or not

animationSpeed The speed of the animation to navigate through the carousel

animationType The type of animation you wish to use. These are swing or linear

startPage If you wish to start the carousel on a different page to 1

onPageChangeStart Callback function to be executed before the page is changed

onPageChangeEnd Callback function to be executed after the page is changed

jquery-carousel's People

Contributors

deanc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.