views:

3495

answers:

4

I'd like a transition effect between 2 or more images. I know that simple transitions can be easily done in JQuery, especially with the Cycle plugin, but I want something more complex. Like this, although it's a poor example. A 'blinds' style effect where you can see one image through the other as it changes. I hope I'm clear.

I really would like to avoid using Flash if possible.

A: 

check out Jquery for beginners

There are 15 of them and they are a great resource. You may want to check out 2, 3, and 8 specifically for this problem.

jmein
A: 

I've used animate a few times already. What I want is a way to implement the style of transition I linked to, either ready-made or with a little help. My problem is that the image is essentially split up, not just moved. Maybe there's a way to use masks?

blork
+3  A: 

Diagonal blinds are going to be nearly impossible with javascript alone. I can think of a few ways to do it with image files, but it would be a holy hack and the animation is unlikely to be smooth. There are probably ways to do it with canvas, but that would be a headache as well because you have to use a canvas->vml to make it work with IE.

If you are okay with horizontal/vertical blinds, just append a bunch of divs and animate the width/height.

John C
+1 diagonal blinds are going to be almost impossible to get right, especially and have them be cross-browser compatible. However vertical or horizontal blinds should be just fine. Make sure to offset the new image an appropriate amount in each of the child divs, and just shrink/grow them.
Adam Bellaire
+1  A: 

If you're fine with the vertical blinds option, there's a very slick jQuery plugin out now that will do the effect you're looking for: http://nivo.dev7studios.com

Ryan