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: 125

Filed under:
|
|
|

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>

image

  1. default
  2. click for blue div
  3. how can i it make? best with transparent :)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery