Link Details

Link 71268 thumbnail
User 224026 avatar

By levitymn
via sweetvision.com
Published: Mar 17 2008 / 12:30

This is a simple tutorial on how to use MooTools to transition between two images using a fade effect. It is a good example of how to use the effects from Mootools.
  • 14
  • 1
  • 7257
  • 2853

Comments

Add your comment
User 219361 avatar

dbulli replied ago:

0 votes Vote down Vote up Reply

This is a nice simple tutorial, and definitely and up vote, but two things ...

- do you really need the extra div?
- you should modify it to be more generic to handle any mount of images

User 224026 avatar

levitymn replied ago:

0 votes Vote down Vote up Reply

dbulli,

Thanks for the comment.

If you want the images to flow with the content of the document you need the outer DIV because of the position:absolute on the two inner DIV tags used to do the fade.

I agree that this code could be modified to be much more generic to allow for any number of images and even loading images dynamically from the server. I chose not to go down that path to keep the code simple and easy to digest. I may write a follow up post that expands on what is covered here.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.