Open ianthedev opened 11 years ago
Yeah, it's not meant to.
Why not?
I guess that the primary goal for this script is to correctly track the swipe event in touch enabled screens, if you want to use it in desktop you need to manually listen for the click event and use the prev() and next() functions
Well... that's inconvenient.
This library is not a UI library, it gives the tool to make a slider. It's much more flexible that way.
You can have prev/next buttons, bullets that show which slide you're on or bullet you can click, or any other piece of navigation you can imagine. You'll then just have to bind them with the API. The API has methods for sliding to a specific slide, or to next and prevous, and allows you to define a callback which is called after each slide with the position.
It seems to me that what you want is to have a "Swipe plugin" which wrap Swipe into a UI, so web dev can just copy/paste the code and have a functioning slider with control. But the point of this library is only to create the core part.
BTW, there are several issues that explain how to create controls and bullets (#234, #285, ...)
I see. Thanks.
I was miffed a bit by that. I think the fact that the CSS for the bullets on the homepage includes "cursor: pointer;" is very misleading as you immediately assume they're clickable. It's pretty easy to hook up yourself though.
The demo doesn't slide when manually click on pagination buttons on desktop browsers.