bkosborne / jQuery-Waterwheel-Carousel

GNU General Public License v3.0
105 stars 69 forks source link

jQuery-Waterwheel-Carousel: How to add touch events features for ipad support #8

Open vjaygaikwad opened 12 years ago

vjaygaikwad commented 12 years ago

Any body please i want to add touch events features for ipad support.

bkosborne commented 11 years ago

Which touch events? The click events for moving the carousel to a different item are already supported. How would a touch event be useful here? To slide your finger and have the carousel move?

Darknior commented 11 years ago

Yes, i think he speak about a drag event.

vjaygaikwad commented 10 years ago

yes, in latest version can I get carousel move with slide ?

jamesalmeida commented 8 years ago

I am trying to figure this out too so it will be more useable on mobile devices.

zdanovskiymihail commented 8 years ago

I also faced with this problem. The solution I found is binding carousel api functions with jquery swipe events:

<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> 
<!-- we need juery.mobile for swipe events. You can replace jquery version with yours. -->

<script type="text/javascript">
    $(document).ready(function() {
        var carousel = $("#carousel").waterwheelCarousel(/* your options here*/);
        $("#carousel").on("swipeleft",function(){
          carousel.next();
        });
        $("#carousel").on("swiperight",function(){
          carousel.prev();
        });
      });
</script>

Where carousel is id of your carousel block.

vjakovlev commented 6 years ago

@zdanovskiymihail

Where carousel is id of your carousel block.

Can you explain more please? I don't get it :D