-
Notifications
You must be signed in to change notification settings - Fork 40
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
Prev button bug if visible is multiple of li's #3
Comments
Hello, I have the same problem here. Did you resolve it? |
Yes with some css/js of my own. But i didn't change the plugin original files. For the css i just set the left arrow to a display:none. Here's the javascript (jQuery based): var countbook = Math.ceil(($('ul.lookbook li').length)/3),
aa = 1;
$('.lookbook .next').on('click', function(){
aa++;
if(aa >= 2){ $('.lookbook .prev').show(); }
if (aa == (countbook)) { $('.lookbook .next').hide(); }
});
$('.lookbook .prev').on('click', function(){
aa--;
if(aa == 1){ $('.lookbook .prev').hide(); }
if (aa < (countbook)) { $('.lookbook .next').show(); }
}); As you can see, i divide the number of items var the countbook variable by 3 on the first line. This is because i'm dispalying 3 images at a time in the slider. Feel free to update. |
Hello, |
There's this line of code in the plugin: |
I've noticed on the simple red demo and also on my current dev that if you set the 'visible' parameter to 4, for example, and put 12 items in the ul, then if you press the 'prev' button, it'll go to the end of the carousel right after the last item and show nothing. Same if you set 'visible' to 3 and display 6 or 9 items, prev goes to some white space.
The text was updated successfully, but these errors were encountered: