Return to Snippet

Revision: 1563
at October 23, 2006 03:22 by pablazo


Initial Code
<head>
<script>
var NAV=0;
if(document.layers){
  NAV=1;
} else if(document.all){
  NAV=2;
}

function ajustarIdentificacion() {
  elem = document.getElementById('capaIdentificacion');
  if (elem != null){
  	C = elem.style;
	C.top=PS();
  }
  return false;
}

function PS(){
var v=0;
switch(NAV) {
 case 0: {v=window.pageYOffset;} break;
 case 1: {v=document.documentElement.scrollTop;} break;
 case 2: {v=document.body.scrollTop;} break;
 default: { v=0;}
}
return v;
}

</script>
</head>
<body onScroll="ajustarIdentificacion();" >
<div id="capaIdentificacion" style="position:relative; left:0px; top:0px; z-index:9;">
contenido de la capa
</div>
</body>

Initial URL


Initial Description


Initial Title
Capa flotante javascript

Initial Tags
javascript

Initial Language
JavaScript