GrassHopperPebbles.com Demos

JQuery Plugins

gpImageRotate 0.5 - Carousel With Navigation

The following example displays the gpImageRotate plugin with mode set to carousel. I also use the primary_nav to display the primary navigation and side_nav to display side navigation.

$(document).ready(function(){
	$("#gpImageRotateCntnr").gpImageRotate({
	    mode: 'carousel',
		interval: 5000,
		data_map: {
			image_name: 'name',
			url_name: 'url',
			image_title: 'image_title'
		},
		primary_nav: {'display': 'bottom'},
		side_nav: {'display': 'onhover'},
		image_url: 'rotate.php',
		base_path: 'images/'
	});
});	
#gpImageRotateCntnr {
	float:left;
	width:600px;
	height:100px;
	margin: 40px 0 20px 40px;
}

.gpImageRotate-Primary-Nav {
	float:left;
	width:100%;
	height:15px;
	margin-bottom:10px;
	display:none;
}

.gpImageRotate-Primary-Nav ul {
	float:right;
	list-style:none;
	margin: 5px 0 0 5px;
	padding:0;
	width:400px;
}

.gpImageRotate-Primary-Nav ul li {
	float:left;
	display:block;
	cursor:pointer;
	height:9px;
	width:9px;
	margin-left:5px;
}

.gpImageRotate-Primary-Nav ul li.gpImageRotate-nav-default {
	background: url("/assets/gpimagerotate/images/dot-nav-blue2.png") no-repeat;
}

.gpImageRotate-Primary-Nav ul li.gpImageRotate-nav-default-selected  {
	background: url("/assets/gpimagerotate/images/dot-nav-blue1.png") no-repeat;
}

.gpImageRotate-SlideCntnr {
	position:relative;
	width:400px;
	height:400px;
	overflow:hidden;
	margin:0;
	padding:0;
}

.gpImageRotate-Slider {
	position:absolute;
	left:0;
	top:0;
	width:5000px;
	margin:0;
	padding:0;
}

a.gpImageRotate-PrevBtn, a.gpImageRotate-NextBtn {
	position:absolute;
	background-image: url("/assets/gpimagerotate/images/image_rotate_side_nav.png");
	top:20px;
	width:34px;
	height:68px;
	opacity: 0.7;
	cursor:pointer;
}

a.gpImageRotate-PrevBtn {
	left:0;
	background-position:0 0;
}

a.gpImageRotate-NextBtn {
	right:0;
	background-position: 34px 0;
}

.gpImageRotate-DisplayCntnr {
	float:left;
	margin:0;
	margin-left:10px;
	padding:0;
	height:100px;
	font-family:Arial, Helvetica, sans-serif;
}

.gpImageRotate-TextCntnr {
	position:relative;
	top:-120px;
	background: rgba(85, 85, 85, 0.7);
	height:120px;
	width:400px;
	display:none;
}

.gpImageRotate-TextCntnr h2 {
	color:#fff;
	font: 16px bold Arial, Helvetica, sans-serif; 
	text-align:center;
	line-height:24px;
}

.gpImageRotate-TextCntnr p {
	color:#fff;
	font: 11px Arial, Helvetica, sans-serif;
	margin:7px; 
}	

For documentation about the gpImageRotate plugin, view the blog post.

Tags

, , , , , , , , , ,