Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Responsive Example #388
@cadday I wondered the same -- but I was hoping it would compute the
It would require reading the item width from the DOM before being able to compute the page count -- or at least accepting the width of an item as a prop but it'd offer a lot of flexibility.
I remember implementing a carousel like this here http://richardscarrott.github.io/jquery-ui-carousel/ many years ago (try resizing the window).
@richardscarrott thanks for your answer. I think the idea of computing slide count automatically sounds good by i don't think it is practical.
It is not just the screen width that changes when switched from a desktop size to mobil size. Orientation change should also be considered.
For example, user might want to hide detail text on smaller screens and this can cause a necessity to show more items on smaller screen than large ones. Or lets say carousel items are structred as image on left text on right. On smaller screens user might want to change the structure and shows image up text bottom. This scenario also causes a necessity showing more or same number of items on smaller screens.