Free web development scripts for the webmasterDevelopment Scripts

 Site Navigation
 o Development Scripts
 o Text Only Edition
 o PHP.net News
 o Tutorials
 o Register an account
 o New entries this week
 o Affiliates/Links
 o Contact Us
 o About us
 o Advanced Search

 Browse Path
 o 3 users online
 o Most users online: 67
 o Home
  o Javascripts
   o Image and Graphics
    o Script

 Member Login
User Name
Password

 Standards
Valid XHTML 1.0!
Valid 
CSS!

 Recommended Links
 o PHP Freaks
 o Designer Baby Clothes
 o Advertise Here Make Money
 o designplace
 o devnet
 o OxyScripts
 o Open Source Design
 o Free Wedding Websites
 o Wedding Vendor Directory

Image opacity & JavaScript (Rated 0)

Description:

This script will take an image and gradually fade it in and out using image opacity and Javascript.

Code starts here


<!-- Image fading script http://www.designplace.org. -->
<!-- written by tux tux@designplace.org -->
<!-- change image id, path and dimensions below to your image dimensions! -->

<img id="tuxie" src="path/images.gif" width=116 height=123
style="-moz-opacity:30%;filter:alpha(opacity=30)">

<script>
value=0
var plus=1
var minus=0

function IE(){
if (value<80&&plus)
value+=5
else{
plus=0
minus=1
}

if (value>30&&minus)
value-=5
else{
plus=1
minus=0
}

document.getElementById("tuxie").filters[0].opacity=value
}


function MOZ()
{
if (value<80&&plus)
value+=5
else{
plus=0
minus=1
}

if (value>30&&minus)
value-=5
else{
plus=1
minus=0
}

document.getElementById("tuxie").style.MozOpacity=value+"%"
}

if (window.sidebar)
{
setInterval("MOZ()",200)
}

if (document.all)
{
setInterval("IE()",200)
}
</script>


Submitted by Devscripts on 13-02-2003 20:09


Rate This Script

User Contributed Comments

Registered Members login
© Copyright 2003 - Devscripts.net