$("#foo1").carouFredSel({ auto : false, items: 1, swipe : { onTouch : true, onMouse : true, options : { excludedElements: "button, input, select, textarea, .noSwipe" } }, prev : "#foo1_prev", next : "#foo1_next" });
.image_carousel { position: relative; width:500px; margin:auto; } .image_carousel #foo1 a { width: 500px; margin: 0px; display: block; float: left; } .image_carousel #foo1 img { border: 1px solid #ccc; background-color: white; padding:9px; } a.prev, a.next { background: url("http://caroufredsel.dev7studios.com/images/miscellaneous_sprite.png") no-repeat transparent; width: 45px; height: 50px; display: block; position: absolute; top: 130px; } a.prev { left: -44px; background-position: 0 0; } a.prev:hover { background-position: 0 -50px; } a.next { right: -44px; background-position: -50px 0; } a.next:hover { background-position: -50px -50px; } a.prev span, a.next span { display: none; } .clearfix { float: none; clear: both; }
<div class="image_carousel"> <div id="foo1"> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=basketball" alt="basketball" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=beachtree" alt="beachtree" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=cupcackes" alt="cupcackes" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=hangmat" alt="hangmat" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=new_york" alt="new york" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=laundry" alt="laundry" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=mom_son" alt="mom son" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=picknick" alt="picknick" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=shoes" alt="shoes" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=paris" alt="paris" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=sunbading" alt="sunbading" width="480" height="320" /></a> <a href="http://www.yaoin.net"><img src="http://fakeimg.pl/480x320/?text=yellow_couple" alt="yellow couple" width="480" height="320" /></a> </div> <div class="clearfix"></div> <a class="prev" id="foo1_prev" href="#"><span>prev</span></a> <a class="next" id="foo1_next" href="#"><span>next</span></a> </div>