Swipe
Swipe copied to clipboard
Is there a way of making the slides fade instead of horizontally moving?
Fantastic slider but just wondering if the transition type can be changed to make it fade in?
why don't you try do it on callback method? Fade faster then a slide....
It would require some surgery on the animation and transition functions within Swipe.
I use PADILICIOUS.COM for a simple fade swipe.
+1
A combination with slide (swipe) on touch devices, and crossfade on "desktop" would make it perfect!
Im looking for this too. Any idea so far?
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.
Sounds like this would take a good bit of work, but I would enjoy seeing this functionality as well.
+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.
:+1: – as Swipe is used by other projects too (namely contao) this would greatly enhance the use within those environments!
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).