www.webdeveloper.com
Results 1 to 3 of 3

Thread: fading

  1. #1
    Join Date
    Jun 2006
    Posts
    4

    fading

    I have been asked to construct a page that has 5 images fade in one after another on load, then fade out again as the next is fading in. Is this something I can do with Javascript or is this something I am going to need more robust recorces like flash for?

  2. #2
    Join Date
    Jun 2004
    Location
    Portsmouth UK
    Posts
    2,645
    Javascript is good for this
    base function
    Code:
    function zxcOpacity(zxcobj,zxcopc) {
     if (zxcopc<0||zxcopc>100){ return; }
     if (zxcobj.style.MozOpacity!=null){ zxcobj.style.MozOpacity=(zxcopc/100)-.001; }
     else if (zxcobj.style.opacity!=null){ zxcobj.style.opacity=(zxcopc/100)-.001; }
     else if (zxcobj.style.filter!=null){ zxcobj.style.filter = 'alpha(opacity='+zxcopc+')';	}
     else if (zxcobj.KHTMLOpacity!=null){ zxcobj.KHTMLOpacity=(zxcopc/100)-.001; }
    }
    see my site below

    keyword search 'opacity'
    Vic

    God loves you and will never love you less.

    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  3. #3
    Join Date
    Jun 2006
    Posts
    4
    Thank you!!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles