thebird / Swipe

Swipe is the most accurate touch slider.
MIT License
6.79k stars 1.69k forks source link

Doesn't slide when manually click on pagination buttons on desktop browsers #304

Open ianthedev opened 11 years ago

ianthedev commented 11 years ago

The demo doesn't slide when manually click on pagination buttons on desktop browsers.

alicelieutier commented 11 years ago

Yeah, it's not meant to.

ianthedev commented 11 years ago

Why not?

ghost commented 11 years ago

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

ianthedev commented 11 years ago

Well... that's inconvenient.

alicelieutier commented 11 years ago

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, ...)

ianthedev commented 11 years ago

I see. Thanks.

GFoley83 commented 11 years ago

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.