Alright, I have a little issue here, I'm not an expert so I need your help.
I have a code for an horizontal scroller (in fact I used the scroller from here: http://coolcarousels.frebsite.nl/c/28/) and I want to integrate it multiple times, here's what it looks like so far:
Basically I want to put the scroller multiple times inside the page, where the red rectangles are. I know that changing the Id for each scroller is one step of the solution, the scroller uses a style sheet and a Js file. I am not an expert so I need someone to clear this up for me.
First, here is the Javascript, called "scroller.js" :
Now here is the CSS:Code:$(function() { $('#carousel span').append('<img src="scroller/carousel_glare.png" class="glare" />'); $('#thumbs a').append('<img src="scroller/carousel_glare_small.png" class="glare" />'); $('#thumbs').carouFredSel({ responsive: true, circular: false, infinite: false, auto: false, prev: '#prev', next: '#next', items: { visible: { min: 2, max: 4 }, width: '155', height: 282 } }); $('#thumbs a').click(function() { $('#carousel').trigger('slideTo', '#' + this.href.split('#').pop() ); $('#thumbs a').removeClass('selected'); $(this).addClass('selected'); return false; }); });
Code:html, body { height: 100%; padding: 0; margin: 0; } body { background: url('bg_glare.png') top center no-repeat; } html > body { min-height: 600px; } body * { font-family: Arial, Geneva, SunSans-Regular, sans-serif; font-size: 14px; color: #333; line-height: 22px; } #wrapper { position: absolute; width: 50%; left: 25%; top: 50px; } #carousel-wrapper { padding-bottom: 10px; position: relative; } #carousel, #thumbs { overflow: hidden; } #carousel-wrapper .caroufredsel_wrapper { border-radius: 10px; box-shadow: 0 0 5px #899; } #carousel span, #carousel img, #thumbs a, #thumbs img { display: block; float: left; height: 262px; } #carousel span, #carousel a, #thumbs span, #thumbs a { position: relative; } #carousel img, #thumbs img { border: none; height: 262px; position: absolute; top: 0; left: 0; } #carousel img.glare, #thumbs img.glare { width: 100%; height: auto; } #carousel span { width: 554px; height: 313px; } #thumbs-wrapper { padding: 20px 0px; position: relative; width: 780px; } #thumbs a { border: 2px solid #899; height: 262px; width: 175px; margin: 0 10px; overflow: hidden; border-radius: 10px;float: left; -webkit-transition: border-color .5s; -moz-transition: border-color .5s; -ms-transition: border-color .5s; transition: border-color .5s; } #thumbs a:hover, #thumbs a.selected { border-color: #566; } #wrapper img#shadow { width: 100%; position: absolute; bottom: 0; } #prev, #next { background: transparent url('carousel_nav.png') no-repeat 0 0; display: block; width: 53px; height: 120px; margin-top: -70px; position: absolute; top: 50%; } #prev { background-position: 0 0; left: -20px; } #next { background-position: -53px 0; right: -20px; } #prev:hover { background-position: 0 -120px; } #next:hover { background-position: -53px -120px; } #prev.disabled, #next.disabled { display: none !important; }
And finally, the HTML code:
Code:<div id="thumbs-wrapper"> <div id="thumbs"> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" alt="Defiance" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> <a href="<?php bloginfo('template_directory');?>/movie.html" rel="ajaxpanel"><img src="http://img825.imageshack.us/img825/2360/posterst.png" /></a> </div> <a id="prev" href="#"></a> <a id="next" href="#"></a> </div>



Reply With Quote

Bookmarks