Toggle Image using jquery? -


here's simpler code. sorry, i'm new here.

if loginbutton clicked. show down login container. please help. thanks.

 <html>  <head> <script> $(document).ready(function(){ $("#login").click(function(){ $("#login_container").slidetoggle("500"); }); }); </script> <style> #login { background-image:url(images/loginbutton.jpg); width:65px; height:22px; float:left;  }  #login_container { background-image:url(images/logincontainer.jpg);    }  </style>  </head>  <body>   <div id="login">  <div id="login_container">  </body>  </html>  

there's nothing wrong code. sure have added jquery file in code?

plus recommend add "display: none" .login_container. or use hide(), this:

$('.login_container').hide();  $('.login').click(function() {     $('.login_container').slidetoggle(500); }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -