div on other div
Posted
by
Gisinior
on Stack Overflow
See other posts from Stack Overflow
or by Gisinior
Published on 2011-06-21T19:52:26Z
Indexed on
2011/06/22
0:22 UTC
Read the original article
Hit count: 130
i have:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<style type="text/css">
#ONE {
background-color: #888;
width: 500px;
height: 500px;
}
#TWO {
background-color: blue;
width: 50px;
height: 50px;
}
#THREE {
background-color: yellow;
width: 200px;
height: 200px;
display: none;
}
#four {
background-color: red;
width: 200px;
height: 200px;
}
</style>
<script type="text/javascript">
$(document).ready(
function()
{
$("#TWO").click(
function()
{
$("#THREE").toggle();
});
});
</script>
<div id="ONE"><div id="TWO"></div><div id="four"></div><div id="THREE"></div></div>
- default
- click for blue div
- how can i it make? best with transparent :)
© Stack Overflow or respective owner