I have the fade in of my image working, and would now like to have text
appear after the fade in of the photo.
style portion:

.enhanced {
 visibility:hidden;
}

javascript functions:

<script language="javascript">
 document.write("<style type='text/css'> ##thephoto {visibility:hidden;}
</style>");
window.onload = function() {initImage()};
 function initImage() {
  imageId = 'thephoto';
   image = document.getElementById(imageId);
   setOpacity(image, 0);
   image.style.visibility = 'visible';
   fadeIn(imageId,0);
 }
function setOpacity(obj, opacity) {
   opacity = (opacity == 100)?99.999:opacity;

// IE/Win
obj.style.filter = "alpha(opacity:"+opacity+")";
 // Safari<1.2, Konqueror
obj.style.KHTMLOpacity = opacity/100;

// Older Mozilla and Firefox
obj.style.MozOpacity = opacity/100;

// Safari 1.2, newer Firefox and Mozilla, CSS3
obj.style.opacity = opacity/100;
 }
function fadeIn(objId,opacity) {
  if (document.getElementById) {
     obj = document.getElementById(objId);
     if (opacity <= 100) {
       setOpacity(obj, opacity);
       opacity += 10;
       window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 150);
     }
if (opacity = 100) {
textId = 'enhanced';
 text = document.getElementById(textId);
text.style.visibility="visible";
 }
   }
}
</script>

I have added this to the last function:

if (opacity = 100) {
textId = 'enhanced';
 text = document.getElementById(textId);
text.style.visibility="visible";
 }

But the text appears instantly.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:313367
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm

Reply via email to