exalt Posted February 15, 2008 at 04:06 PM Report Share #167113 Posted February 15, 2008 at 04:06 PM Boas, É o seguinte tenho um código JavaScript, que faz um menu que abre e fecha, o que desejo é saber como posso fazer para o menu abrir e fechar mas com um efeito deslizante. O código que tenho é o seguinte: <script type="text/javascript"> function shDiv(popup) { var box = document.getElementById(popup) var a = document.getElementById(popup + '_a') var t = document.getElementById(popup + '_t') a.innerHTML =(a.innerHTML=='Aberto')?'Fechado':'Aberto'; t.className =(t.className=='Tclose')?'Topen':'Tclose'; box.style.display = (box.style.display=='none')?'block':'none'; } </script> <div class="shBox" id="box1" style="display:none;"> <div style=" background-color:#000000; width:500px; height:70px; color:#FFFFFF;"> TESTE </div> </div> <span id="box1_t" class="Topen"></span><a href="#" onclick="shDiv('box1');" id="box1_a">Fechado</a> Para saberem mais precisamente o que desejo aqui fica um exemplo: http://www.shape5.com/demo/index.php Espero que possam ajudar Cumps Link to comment Share on other sites More sharing options...
Guest id194 Posted February 15, 2008 at 09:22 PM Report Share #167189 Posted February 15, 2008 at 09:22 PM Com JS puro não te posso ajudar, mas se usares uma lib JS tipo jQuery, podes fazer isso muito facilmente.. Link to comment Share on other sites More sharing options...
exalt Posted February 16, 2008 at 09:44 PM Author Report Share #167369 Posted February 16, 2008 at 09:44 PM Com JS puro não te posso ajudar, mas se usares uma lib JS tipo jQuery, podes fazer isso muito facilmente.. se me puderes explicar melhor como fazer agradecia 👍 cumps Link to comment Share on other sites More sharing options...
Guest id194 Posted February 17, 2008 at 12:50 PM Report Share #167445 Posted February 17, 2008 at 12:50 PM http://docs.jquery.com/Effects/slideDown Link to comment Share on other sites More sharing options...
exalt Posted February 17, 2008 at 06:59 PM Author Report Share #167509 Posted February 17, 2008 at 06:59 PM http://docs.jquery.com/Effects/slideDown ty 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now