Swipe icon indicating copy to clipboard operation
Swipe copied to clipboard

Is there a way of making the slides fade instead of horizontally moving?

Open TheNibbler opened this issue 12 years ago • 10 comments

Fantastic slider but just wondering if the transition type can be changed to make it fade in?

TheNibbler avatar Mar 13 '13 17:03 TheNibbler

why don't you try do it on callback method? Fade faster then a slide....

tomekl avatar Mar 16 '13 04:03 tomekl

It would require some surgery on the animation and transition functions within Swipe.

thebird avatar Mar 18 '13 20:03 thebird

I use PADILICIOUS.COM for a simple fade swipe.

mtamony avatar Mar 19 '13 19:03 mtamony

+1

A combination with slide (swipe) on touch devices, and crossfade on "desktop" would make it perfect!

o-l-e avatar Mar 20 '13 06:03 o-l-e

Im looking for this too. Any idea so far?

noisik avatar May 23 '13 23:05 noisik

Swipe is made for horizontal sliding. I'm sure many plugins do fading, but it's really not simple to do that with Swipe without changing a good half of the code.

alicelieutier avatar May 24 '13 13:05 alicelieutier

Sounds like this would take a good bit of work, but I would enjoy seeing this functionality as well.

dcalhoun avatar Dec 02 '13 15:12 dcalhoun

+1 on this. I love falling back to Swipe whenever I need an image slider, but sometimes it'd be nicer with a subtle fade over a slide.

nilskaspersson avatar Jan 29 '14 14:01 nilskaspersson

:+1: – as Swipe is used by other projects too (namely contao) this would greatly enhance the use within those environments!

a-v-l avatar Mar 08 '14 00:03 a-v-l

Easy solution (worked for me)

use the callback to input active element class

      callback: function(index, elem) {
        $(elem).siblings().removeClass('active');
        $(elem).addClass('active');
      },

than use the .active class to transition the item opacity

        .item {
            visibility: hidden;
            opacity: 0;
            .transition(visibility 0s, opacity 0.4s ease);

            &.active {
                visibility: visible;
                opacity: 1;
            }
        }

Of course the horizontal move will continue to happen, but now without the transition (replaced by the new opacity transition).

macedd avatar Nov 06 '16 22:11 macedd