Open/Close on click JQuery
<p>When the ID 'Home' is clicked in the following example, the div.panel will appear, and then if the ID 'Home' is clicked again, the div.panel is hidden. Currently I have this:</p>

<pre><code>$(document).ready(function() {
$('#home').on('click', function() {
    $('div.panel').animate({
        'width': 'show'
    }, 1000, function() {
        $('div.home').fadeIn(500);
    });
});

$('#home').on('click', function() {
    $('div.home').fadeOut(500, function() {
        $('div.panel').animate({
            'width': 'hide'
        }, 1000);
    });
});
});
</code></pre>
