why doesnt it hide my div
<pre><code>&lt;html&gt;

&lt;head&gt;
    &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div align="center" style="margin-top:15%;"&gt;
    &lt;div id="out" align="center" style="border-style:solid;border-width:1px;width:300px;"&gt;
        &lt;div id="out_text" align="center" style="margin-top:20;height:40px;width:200px;"&gt;
        Welcome
        &lt;/div&gt;
        &lt;form method="post"&gt; 
            Username: &lt;input type="text" name="user"&gt;&lt;br&gt;
            Password: &lt;input type="password" name="password"&gt;&lt;br&gt;
            &lt;input id="login" type="submit" value="Login"&gt;
            &lt;input id="add" type="submit" value="Add User"&gt;
        &lt;/form&gt;

    &lt;/div&gt;

    &lt;div id="in" style="border-style:solid;border-width:1px;width:300px;"&gt;
        &lt;div id="in_text" align="center" style="margin-top:20;height:40px;width:200px;"&gt;
        "test"
        &lt;/div&gt;
        &lt;form&gt;
            &lt;input id="logout" type="submit" id="logout" value="Logout"&gt;    
        &lt;/form&gt;
    &lt;/div&gt;

&lt;/div&gt;

&lt;script&gt;
$(document).ready(function() {
    $('#out').show();
    $('#in').hide();
}); 

$('#login').click(function() {
    $('#out').hide();
    $('#in').show();
    $('#in_text').text("Success");
});

$('#logout').click(function() {
    $('#out').show();
    $('#in').hide();
    $('#out_text').text("Welcome");
});
&lt;/script&gt;

&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>so my question is why doesnt my $(document).ready hide the div with id="in" when the page finishes loading? i thought that was how it was done. am i missing something here? im looking through various tutorials and it see them do the same thing i am doing, but for some reason, my jquery is not working.</p>

<p>edit: ok so thanks to you guys, i was able to hide the other div. thank you. however, now i have a different problem. i am trying to make an onclick event handler that switches which div to display and change the text. i edited the code as following, can anyone here figure out why it doesnt work?</p>
