A question about a standard way to hide a div in Javascript and jQuery
<p>I'm still relatively new to javascript and jQuery and was just wondering this.</p>

<p>Suppose I have this HTML snippet:</p>

<pre><code>&lt;p id="disclaimer"&gt;
Disclaimer! &lt;/p&gt;
&lt;input type="button" id="hideButton" value="hide" /&gt;
</code></pre>

<p>I could hide the div in the following ways:</p>

<pre><code>$(document).ready(function() {
    $('#hideButton').click(function() {
        if ($('#disclaimer').css('display') == 'none') {
            $('#disclaimer').show();
            $('#hideButton').val('hide');
        } else {
            $('#disclaimer').hide();
            $('#hideButton').val('unhide');         
        }
    })
});
</code></pre>

<p>OR</p>

<pre><code>$(document).ready(function() {
$('#hideButton').click(function() {
    if ($('#disclaimer').is(':visible')) {
        $('#disclaimer').hide();
        $('#hideButton').val('unhide'); 
    } else {
        $('#disclaimer').show();
        $('#hideButton').val('hide');
    }
    })
});
</code></pre>

<p>My question is: Is there a preferred method of hiding the div or is it just a matter of personal preference?</p>
