3 Replies - 871 Views - Last Post: 10 October 2010 - 04:26 PM

#1 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Create Fade Transitions in JavaScript?

Posted 08 October 2010 - 12:23 PM

Ok, so I'm trying to get away from Flash. I have many reasons why I'm doing it and I'm NOT looking to debate over that decision. I'm just wanting to know how I can make simple fade transitions between a series of images using Javascript. I found a tutorial online that does this. However, it doesn't look right because instead of a straight fade from one image to the next, it fades out to white, and quickly fades the new image in from white. That would look ok in some instances, but for my site it would look quite annoying! I also understand that there is an easy way to do what I want in IE, but it is necessary that this works in ALL major browsers. I also do not want to use CSS3 because few browsers actually support that yet. Thank you for any help :)

Is This A Good Question/Topic? 0
  • +

Replies To: Create Fade Transitions in JavaScript?

#2 Munawwar  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 161
  • View blog
  • Posts: 457
  • Joined: 20-January 10

Re: Create Fade Transitions in JavaScript?

Posted 08 October 2010 - 01:41 PM

Since you are an ex-flash fan, you may use javascript motion tween library.You can use the OpacityTween class found in the link.

Also check jQuery.The syntax maybe a little difficult to digest at first, since it isn't the traditional js.

EDIT: Code removed. It wasn't needed anyway.

This post has been edited by Munawwar: 08 October 2010 - 01:46 PM

Was This Post Helpful? 0
  • +
  • -

#3 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 921
  • View blog
  • Posts: 6,456
  • Joined: 07-September 06

Re: Create Fade Transitions in JavaScript?

Posted 09 October 2010 - 10:49 AM

Additionally, if you know Javascript you could create your own tween functionality from scratch. It is quite easy, and only takes around 100 lines to have a cross-browser tween class capable of tweening any pixel/ percentage-based CSS property.
Was This Post Helpful? 0
  • +
  • -

#4 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Re: Create Fade Transitions in JavaScript?

Posted 10 October 2010 - 04:26 PM

Thanks guys :) It works great now!
Was This Post Helpful? -1
  • +
  • -

Page 1 of 1