Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
- <script>
- $(document).ready(function(){
- $('a').click(function () {
- var divName = this.name;
- $("#"+divName).fadeIn(1000).siblings().fadeOut(1000);
- });
- });
- </script>
- </head>
- <body>
- <!--- BACKGROUND --->
- <div id="bck" style="position:absolute; height:900px; width:100%; top:0px; left:0px; background:#000000;"></div>
- <!--- MENU --->
- <div id="menu" style="width:300px; left:0px; top:150px; height:600px; position:absolute;">
- <ul>
- <li><a href="#" name="div1" >div1</a></li>
- <li><a href="#" name="div2" >div2</a></li>
- </ul>
- </div>
- <div>
- <!--- DIV1 --->
- <div id="div1" style="display:none; position:absolute; height:590px; width:800px; top:150px; left:300px; background:#ffffff; color:#ffffff;">
- <div id="subdiv1-1" style="position:absolute; left:10px; top:10px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv1-2" style="position:absolute; left:405px; top:10px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv1-1" style="position:absolute; left:10px; top:300px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv1-2" style="position:absolute; left:405px; top:300px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- </div>
- <!--- DIV2 --->
- <div id="div2" style="display:none; position:absolute; height:590px; width:800px; top:150px; left:400px; background:#FFFFFF; color:#000000">
- <div id="subdiv2-1" style="position:absolute; left:10px; top:10px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv2-2" style="position:absolute; left:405px; top:10px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv2-1" style="position:absolute; left:10px; top:300px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- <div id="subdiv2-2" style="position:absolute; left:405px; top:300px; height:280px; width:385px; background:#c1c1c1; color:#000000">
- testing 123
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement