Giter Club home page Giter Club logo

leuk / loopedcarousel Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 165 KB

loopedCarousel is a plugin made for jQuery that is not only a looping carousel, its main goal is to be extremely easy to implement. No more messing around with CSS to get your carousel to look and function properly. You want to show 5 items? Tell it "items: 5". You want some spacing in between those items? Just tell it "spacing: 15". You want it to be vertical? Tell it "vertical: true". Damn thing even auto generates pagination for you based on how many total items you have and how many items you're showing. Keep it simple!

Home Page: http://nathansearles.com/loopedcarousel/

loopedcarousel's Introduction

loopedCarousel 0.5 – jQuery plugin

loopedCarousel is a plugin made for jQuery that is not only a looping carousel, its main goal is to be extremely easy to implement. No more messing around with CSS to get your carousel to look and function properly. You want to show 5 items? Tell it “items: 5”. You want some spacing in between those items? Just tell it “spacing: 15”. You want it to be vertical? Tell it “vertical: true”. Damn thing even auto generates pagination for you based on how many total items you have and how many items you’re showing. Keep it simple!

Info

Developed by Nathan Searles, http://nathansearles.com

For updates, follow Nathan Searles on Twitter

Examples

Markup

	 
<div id="loopedCarousel">	
	<div class="container">
		<div class="slides">
			<div>1</div>
			<div>2</div>
			<div>3</div>
			<div>4</div>
			<div>5</div>
			<div>6</div>
			<div>7</div>
			<div>8</div>
			<div>9</div>
			<div>10</div>
			<div>11</div>
			<div>12</div>
			<div>13</div>
			<div>14</div>
			<div>15</div>
		</div>
	</div>
	<a href="#" class="previous">previous</a>
	<a href="#" class="next">next</a>	
</div>

CSS

.container {height:180px; overflow:hidden; position:relative; background:#fff; border:1px solid #9e9e9e;}
.slides {position:absolute; top:10px; left:0;}
.slides div {position:absolute; top:0; width:160px; height:160px; display:none; text-align:center; background-color:#d8d8d8; border:1px solid #ccc;}

Initialize

<script type="text/javascript" charset="utf-8">
	$(function(){
		$('#loopedCarousel').loopedCarousel();
	});
</script>

Options

container: '.container', // Class or ID of main container
slides: '.slides', // Class or ID of slide container
pagination: '.pagination', // Class or ID of pagination container
autoStart: 0, // Set to positive number for auto start and interval time
slidespeed: 300, // Speed of slide animation
fadespeed: 300, // Speed of fade animation
items: 3, // Items shown
padding: 10, // Padding between items
showPagination: true, // Shows pagination links
vertical: false // Set to true for vertical carousel

Changelog

  • 0.5 – Initial release

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.