Hey everybody, Ive tried to write a sliding drop down menu, but the text inside the div dont disappear in the right time. look:
What can I do for fix it?Code:<script> function aumenta(id) { target = document.getElementById(id); setInterval(function(){ new_size = target.style.height; new_size = new_size.split("px", 1); new_size -= 10; new_size = new_size + "px"; target.style.height = new_size; //target.style.width = new_size; if (new_size == "0px") { document.getElementById(id).style.display = "none"; clearInterval(); return false; } },1); } </script> </head> <body > <div id="da" style="width:300px; height: 300px; background-color: #0066CC;" onmouseover="aumenta('da')">dDffffffffffffffffffdsdsd <br /> <br /> asdjksdkjn <br /> <br /> kjbskjdnas <input type="text" size="25" /> </div>
The text disappear only when de the div disappeared completely...
Thanks!



Reply With Quote

Bookmarks