Hi,
I have a hidden DIV, which is going to cover all of the screen as part of a lightbox. I wrote my code based on what I found at docs.jquery.com/Tutorials:Basic_Show_and_Hid . When I click on the link to run the lightbox, the div isn't showing even through the z-index is the highest on the page. I've also tried seeing if it was a corrupted version of jQuery. What's wrong?
<style type="text/css">
#video1
{
position:absolute;
top:350px;
left:0px;
width:100px;
height:100px;
background-color:#00FF00;
z-index:4;
}
#lightbox
{
position:absolute;
top:0%;
left:0%;
height:100%;
width:100%;
background-color:#000000;
opacity:0.7;
visibility:hidden;
z-index:5;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#video1").click(function(){
$("#lightbox").show();
alert("test");
});
});
</script>
<!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>Index</title>
</head>
<body>
<div id="video1"></div>
</body>
</html>