jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 736 forks source link

Last Item cut #24

Closed a2moosh closed 14 years ago

a2moosh commented 14 years ago

Hey m8, first of all thx for the carousel. But I still have small issues with it :-S The amount images being scrolled does not fit with the amount I define in the ready-function

jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        size: mycarousel_itemList.length,
    scroll: 30,
..

and, sometimes the last Item is just cut or lies under the arrow (if I change the css) - which is obviously a problem caused by the margin or border of the <li>-items. As the border of the <li> will be streched I set this to none and chose to give a border 1px solid to the img inside.

I played around a bit with the css, but I can't solve the probs I guess...maybe you could have a quick look at http://jagas.de/rm/weiss/portfolio.html (which is under progress)?

jsor commented 14 years ago

You have 42 items in your carousel, so the carousel can only scroll 14 items until it reaches the end (with 28 visible items). Or did i missunderstand your question?

Second question: a width of 1040px for .jcarousel-clip-horizontal fixed that for me.

a2moosh commented 14 years ago

Good morning, thx for the quick answer! You're right, with the scrolling :-S but pls have a look at the second page: http://jagas.de/rm/weiss/editorial.html there you have it, the last item is not shown right away - I have 50 items, but with the first scrolling forward the script scrolls only until item no. 49.

The "issue" with the li-border is better shown now, I changed the border color - as the background-color will be variable, the "streching" of the border becomes visible - setting it to none or 0px will make the margin between the li-items shrink. I can still change this border-color by the help of JS, I just thought theres another way of solving it maybe..

jsor commented 14 years ago

I see that you change the width of the clip manually:

$(".jcarousel-skin .jcarousel-clip-horizontal").css("width", (anzahl_bilder * 42) + 50 +"px");

Is there a reason why you do that?

a2moosh commented 14 years ago

Ah, right. If theres less than 30 items, I resize it, as I want the carousel to be centered. You can see the effect on the 3rd page with the carousel: http://jagas.de/rm/weiss/making_of.html sry for all this work..

jsor commented 14 years ago

Try to remove the visible option and set scroll to 28. 30 makes no sense here because you have only 28 items visible.

a2moosh commented 14 years ago

Thanks for the help! I guess now I've fixed most issues ;-)