<script type="javascript">
$('[rel="lightbox"]').click(function(){
setTimeout(function(){
$("#jquery-overlay").click()
},1000)
})
</script>
tengo 2 codigos les voy a mostrar :
el primero:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSS Lightbox</title>
<script type="text/javascript">
function showLightbox() {
document.getElementById('over').style.display='block';
document.getElementById('fade').style.display='block';
}
[/color]function hideLightbox() {
document.getElementById('over').style.display='none';
document.getElementById('fade').style.display='none';
}
</script>
<script type="javascript">
$('[rel="lightbox"]').click(function(){
setTimeout(function(){
$("#jquery-overlay").click()
},1000)
})
</script>
<style type="text/css">
body {
background-color: #FFFFFF;
font-family: "Trebuchet MS", Tahoma, Verdana;
font-size: 12px;
font-weight: normal;
color: #666666;
margin: 10px;
padding: 0;
}
.fadebox {
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.overbox {
display: none;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
z-index:1002;
overflow: auto;
}
#content {
background: #FFFFFF;
border: solid 3px #CCCCCC;
padding: 10px;
}
</style>
</head>
<body>
<p><a href="javascript:showLightbox();">Show LightBox</a></p>
<div id="over" class="overbox">
<div id="content">
Ventana creada con CSS<br />
como ejemplo de <strong>Lightbox</strong>.<br /><br />
<a href="javascript:hideLightbox();">Hide LightBox</a>
</div>
</div>
<div id="fade" class="fadebox"> </div>
</body>
</html>
este es el 2 codigo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thickbox - One box to rule them all.</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<link href="css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
<style type="text/css" media="all">
h1 {
text-align: center;
font-size: 32px;
margin: 60px;
font-family: Georgia, "Times New Roman", Times, serif;
}
a {
color: #F00;
}
</style>
<script src="jquery.js" type="text/javascript"></script>
<script src="thickbox.js" type="text/javascript"></script>
<script>
$(".thickbox").click(function(){
setTimeout(function(){
$("#TB_overlay").click()
},1000)
})
</script>
</head>
<body>
<h1>
<a href="ventana.html?height=220&width=400" title="ajax" class="thickbox">Abrir Ventana usando Thickbox 2.1</a>
</h1>
</body>
</html>