Created
August 22, 2013 02:21
-
-
Save jlazanowski/6302508 to your computer and use it in GitHub Desktop.
Carousel Swipe support with multiple sliders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| $(document).ready(function() { | |
| //add your other targets here | |
| $("#myCarousel, #myOtherCarousel").swiperight(function() { | |
| $(this).carousel('prev'); | |
| }); | |
| //add your other targets here | |
| $("#myCarousel, #myOtherCarousel").swipeleft(function() { | |
| $(this).carousel('next'); | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the writeup on your blog. It got me what I needed with minimal effort.
If you use Bootstrap 3's
.carouselclass, you can handle swipe support for all carousels with a simplified selector