more concise jquery for multi button controlling visibility of same div
<p>I have 3 buttons that control the visibility of 1 div.</p>

<p>we want to do following to div:</p>

<ul>
<li>show the first time any of three buttons are clicked</li>
<li>show if button clicked is different to previously button click</li>
<li>hide if button clicked is the same as previous clicked and if div is currently visible</li>
<li>show if button clicked is the same as previous clicked and if div is currently invisible</li>
</ul>

<p>currently I have this:</p>

<pre><code>//$('#alert_area') = target div

$button = $('.button')

if ($button.attr('id') != $('#alert_area').attr('showing')){
    $('#alert_area').show()
}else{
    if ($('#alert_area').is(":visible")){
        $('#alert_area').hide(); 
    }else{
        $('#alert_area').show(); 
    }
}
$('#alert_area').attr('showing', $button.attr('id'))
</code></pre>
