Posts

Showing posts with the label Lightbox popup in html

Fading effect to Html popup

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type='text/javascript'> // Browser safe opacity handling function function setOpacity( value ) {  document.getElementById("styled_popup").style.opacity = value / 10;  document.getElementById("styled_popup").style.filter = 'alpha(opacity=' + value * 10 + ')'; } function fadeInMyPopup() {  for( var i = 0 ; i <= 100 ; i++ )    setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i ); } function fadeOutMyPopup() {  for( var i = 0 ; i <= 100 ; i++ ) {    setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );  }  setT...