Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option.start problem #34

Open
wweggplant opened this issue Sep 1, 2016 · 0 comments
Open

option.start problem #34

wweggplant opened this issue Sep 1, 2016 · 0 comments

Comments

@wweggplant
Copy link

wweggplant commented Sep 1, 2016

this is in your website

start
You can specify from which item the carousel should start. Remember, the first item in the carousel has a start of 0, and so on.

I use your demo/ demo-01.html ,and modifed code:
origin:

$(".default .carousel").jCarouselLite({
    btnNext: ".default .next",
    btnPrev: ".default .prev"
});

to:

$(".default .carousel").jCarouselLite({
    start:7,//add this
    btnNext: ".default .next",
    btnPrev: ".default .prev"
});

I found that the sequence of carousel was error when I click the prev/next btn.

then, I read the code,find this:
line 199~205

if(to <= options.start - numVisible - 1) {
     newPosition = to + initialItemLength + options.scroll;
     ul.css(animCss, -(newPosition * liSize) + "px");
     calculatedTo = newPosition - options.scroll;
     console.log("Before - Positioned at: " + newPosition + " and Moving to: " + calculatedTo);
}

I think that options.start - numVisible - 1 has problem probably .

please reply me.

thank you ~~ ☺☺☺☺☺☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant