Scroller

December 14, 2011 by Marcin Dziewulski

2 comments

Introduction

Scroller is a plugin for jQuery that allows display images in the form of round markers

JavaScript

$('.scroller').scroller({
	element: 'a', // (string) HTML element
	direction: 'horizontal', // (string) available options: horizontal, vertical
	container: {
		name: 'inside', // (string) class name for the container
		easing: 'easeOutBack', // (string) set the easing of the animation, required: jQuery Easing plugin: http://gsgd.co.uk/sandbox/jquery/easing/
		duration: 800 // (int) set the speed of the easing animation in milliseconds
	},
	options: {
		margin: -20, // (int) set the margin for each element 
		zoom: 1.5, // (int) zoom multiplier
		easing: ['easeOutBack', 'easeOutBounce'],
		duration: [300, 500]
	},
	onclick: function(a, img){},
	onmouseover: function(a, img){},
	onmouseout: function(a, img){}
});

HTML

<div class="scroller">
	<div class="inside">
		<a href="#"><img src="assets/img1.jpg" alt="" /></a>
		<a href="#"><img src="assets/img2.jpg" alt="" /></a>
		<a href="#"><img src="assets/img3.jpg" alt="" /></a>
		<a href="#"><img src="assets/img4.jpg" alt="" /></a>
		<!-- etc. -->
	</div>
</div>

Author

Marcin Dziewulski

Marcin Dziewulski

Experienced and creative web developer from Poland, addicted to jQuery and CSS. Follow him on Twitter: @marcinmobily

Comments (2)

Reply

Martian Skills

December 25, 2011 - 16:17

Awesome! I'll be using this real soon. Thanks for sharing, Marcin.

BTW, I love your site's minimalism too.

Reply

Candyr

January 01, 2012 - 07:18

thank you!

Leave a comment

Allowed tags: <b><i><br>