Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

Fade #29

Closed paulmist closed 13 years ago

paulmist commented 13 years ago

Loving this, such a slick solution to the responsive carousel problem.

I'd be interested to know if the capability is there to 'crossfade' image without them sliding?

Thanks

Wilto commented 13 years ago

Hey Paul,

Thing is, the (vast) majority of my code is calculating widths and whatnot for the sake of the slider “motion.” A version of this that just could be way lighter, code-wise: you’d really just need to position the images over each other and give them a width of 100%, then use jQuery’s native fade functions (or CSS opacity and transitions).

Hope that helps! -M

paulmist commented 13 years ago

Thanks!

I realised this had been asked before, and totally understand what you're saying.

I've been toying with your Gist - https://gist.github.com/1107253

It works, but doesn't stop when at the last

  • . You have any other recommendations?

  • Wilto commented 13 years ago

    I just tweaked a couple things in that Gist—added a check for the next/previous slides (and made it a little more DRY, because I’m obsessive). Still untested, but give that a shot.

    paulmist commented 13 years ago

    Worked a treat. Thank you. Got the images fading in and out too. Trying to work out how to crossfade them though. Wish me luck.