Jquery form hide/show div element
I have little problem with some jquery execution. I have one div which i want to hide and show with link.
$("#butt_form").click(function(){
if ($("#site_form").is(":hidden"))
$("#site_form").slideDown(300);
else
//$("#site_info").hide();
$("#site_form").slideUp(300);
<div class='info_block' id='site_form'>
****************************
</form></div>
<a href='' id='butt_form' class='no'>form: ON</a>
开发者_如何学编程The problem is that it begin and before end i think it stop and doesn't hide.
Why not try slideToggle (http://api.jquery.com/slideToggle/)?
$("#butt_form").click(function () {
$("#site_form").slideToggle(300);
return false;
});
That should do the trick.
精彩评论