/ Published in: HTML

Para hacer un solo desplegable, dejar solo una lÃnea de
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<-- página dónde se encontró: http://api.jquery.com/slideDown/ --!> <!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" /> <style> div { background:#de9a44; margin:3px; width:80px; height:40px; display:none; float:left; } </style> </head> <body> Leer más <script> $(document.body).click(function () { if ($("div:first").is(":hidden")) { $("div").slideDown("slow"); } else { $("div").hide(); } }); </script> </body> </html> <-- cambiar todos los div por nuestro propio div, al que vayamos a aplicar esta función: div#desplegable <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> div#desplegable { background:#de9a44; margin:3px; width:80px; height:40px; display:none; float:left; } </style> </head> <body> Leer más <script type="text/javascript"> $(document.body).click(function () { if ($("div#desplegable:first").is(":hidden")) { $("div#desplegable").slideDown("slow"); } else { $("div#desplegable").hide(); } }); </script> </body> </html>--!>
URL: http://api.jquery.com/slideDown/
Comments
