Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/11/2010, 17:46
PanchoJ
 
Fecha de Ingreso: abril-2009
Ubicación: Santa Fe, Capital
Mensajes: 38
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: ¿Como hacer delay?

Funciono bien setTimeout(), agrego un ejemplo muy sencillo

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Delay</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="Content-Script-Type" content="text/javascript"/>
<meta name="Content-Style-Type" content="text/css"/>
<script type="text/javascript">
//<![CDATA[
var speed=2000;
var id = "";
var accion = "";
function show(i,ac){
    id = i;
    accion = ac;
    setTimeout('fadeIn()',speed);
}

function fadeIn() {
    document.getElementById(id).style.display=accion;
}
//]]>
</script>
</head>
<body>

<div id="visible" onmouseover="show('oculto','inline');" onmouseout="show('oculto','none');">
    visible
</div>
<div id="oculto" style="display: none;">oculto</div>
</body>
</html> 

Gracias caricatos