How I can hide this text box
Hello!
This is my code:
- <!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>Untitled Document</title>
- <style type="text/css">
- ul { list-style-type: none; padding: 5; }
- div#box { width: 800px; height: 500px; margin-left: -100px; margin-top: -35px; position: absolute; left: 20%; top: 10%; border-width: 1px; border-style: dotted; }
- div#box1 { width: 800px; height: 100px; margin-left: -100px; margin-top: -35px; position: absolute; left: 24%; top: 18%; border-width: 1px; border-style: dotted; }
- </style>
- <script src="jquery.js" type="text/javascript"></script>
- <script type="text/javascript">$(document).ready( function() {
- $('ul li').toggle(function() { unroll(this); }, function() { roll(this); });
- roll($('ul li'), true);
- });
- function unroll(parent) {
- $(parent).children('ul').slideDown('normal');
- }
- function roll(parent) {
- $(parent).find('ul').slideUp('normal');
- }</script>
- </head>
- <body>
- <div id="menu">
- <ul><li>Main menu<ul><li><div id="box">Text Text Text Text Text Text</div></div></li></ul>
- </li>
- </ul>
- <ul><li>Maine menu1</a><ul><li>- menu 1<ul><li><div id="box1"><img src="music.jpg" widt="100" height="100"/></div>
- </li></ul><li>- menu 2</li><li>- menu 3</li></li></ul></ul>
- </body>
- </html>
All I want to do is hide this <div id="box"> with text after clicking on Main Menu1. Look at the screen - I want to hide this one with black arrow after click on menu1, 2 or 3 or MM1 (red arrow). How I can resolve this? And how I can hide <div id="box1"> after click on Main Menu?
Sorry for bad english.