I have a div that is hidden and being declared this way:
<div id="divLogin" style="visibility:hidden;">
My idea is to use jquery to make it slide in
so I created this code:
$("btEnviarAcesso").click(function ()
{
$("divLogin").slideToggle("slow");
});
but it is not working… Does someone have any ideia why??
You are using
visibility:hiddento hide thedivbut the jQuery show functions don’t adjustvisibility. I would suggest doing this:And then change your code to this:
This assumes an element with the ID of
btEnviarAcessothat can take theclickevent.EDIT: Make sure you put that code inside a
document.readyfunction:You can see this solution working in this demo.
Edit 2
Replace this:
With this: