problem with .post and hiding a form

problem with .post and hiding a form

Hello,

I have two forms in my code (a login, and a resgister), one is shown, the other is hidden. My problem is when, in the $(document).ready(), I do something like:

$("#register_form").hide();
$("#register_form").submit(function()
{
     $.post("register.php"), { username:$('username'),val(), }, function(response)
     {
     }
     ...
}


when I call .post in here, my register form doesn't stay hidden on page load like it should. When I take the .post() out, then my form stays hidden. Anyone have a way to solve this problem?

Thank you very much.