bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Make Carousel swipe-able

Open scottromack opened this issue 14 years ago • 26 comments

Is this a good idea or no? Or, is there a good library out there that would fill this need?

scottromack avatar Mar 08 '12 21:03 scottromack

try swipejs.com https://github.com/bradbirdsall/Swipe try the branch for swipe2

ibrent avatar Mar 10 '12 23:03 ibrent

While i think adding swipe support is awesome, don't think it should be bake into the core of the plugin. Definitely something which should live in a mobile extension. :)

fat avatar Mar 20 '12 03:03 fat

Bummer. I disagree since touch devices are in everyone's pockets and are coming to most screens near you. The amount of touch code is small but adds usable functionality which people will soon expect from modules like sliders etc. I thought that Bootstrap was built for both today and the future.

ibrent avatar Mar 20 '12 04:03 ibrent

The reason is that swipe is an enhancement (a cool one, but still an enhancement). If carousel didn't work at all, it would be a different story.

fat avatar Mar 20 '12 04:03 fat

OK I understand. It's your ship and you are the captain. And it's a rockin good ship by the way - thank you.

I like Chris' touch carousel addition and would love it as a mobile extension. I also bet you a delicious beverage of your choice that within 9 months you will be adding touch events into the core.

ibrent avatar Mar 20 '12 04:03 ibrent

well if @pamelafox keeps up the crossfit she might just bully me into it :)

fat avatar Mar 20 '12 06:03 fat

Understood. :D

ibrent avatar Mar 20 '12 16:03 ibrent

It's a shame this is closed. It would be nice to have this by default. Instead I am looking at having to roll my own with swipe.js or something else. The pull request looks like a really nice addition.

andyburke avatar Oct 30 '12 00:10 andyburke

With the move to Bootstrap 3 and the mobile-first approach, perhaps this is no longer an enhancement, but something that should be baked into the carousel core.

briznad avatar Feb 08 '13 21:02 briznad

+1

johannesnagl avatar Feb 13 '13 09:02 johannesnagl

+1

naoufal avatar Feb 18 '13 23:02 naoufal

How about having it as an option? Keep the current one and add the swipe on its own?

JadH avatar Feb 19 '13 07:02 JadH

For those wanting an interim fix, the following tutorial (not mine) provides an easy workaround: http://lazcreative.com/blog/how-to/how-to-adding-swipe-support-to-bootstraps-carousel/

briznad avatar Feb 19 '13 17:02 briznad

+1 this is not just needed for mobile, it's for all touch enabled devices, including tablets, and future hybrids like microsoft surface

lukebrowell avatar Mar 07 '13 20:03 lukebrowell

+1

kieste avatar Apr 12 '13 19:04 kieste

+1

tector avatar Apr 12 '13 19:04 tector

The JQMobile solution doesn't work on my iPhone with current WIP Bootstrap 3 !? But this one works for me out of the box: http://www.netcu.de/jquery-touchwipe-iphone-ipad-library

$(window).load(function(){
    $("#myCarousel").touchwipe({
        wipeLeft: function() { $("#myCarousel").carousel('next'); },
        wipeRight: function() { $("#myCarousel").carousel('prev'); }
    });
});

kieste avatar Apr 13 '13 00:04 kieste

@kieste look nice did you give it a shot on android or windows mobile?

boulox avatar Apr 13 '13 00:04 boulox

Tested on Galaxy S II with Chrome. Works like a charm. Had to set "preventDefaultEvents" to false so that vertical page scrolling still works when moving up and down on the carousel.

kieste avatar Apr 13 '13 10:04 kieste

+1

marygutz avatar May 20 '13 23:05 marygutz