How to hide a div if user clicks anywhere but a link and the div itself using jQuery?
<p>Ok, so simple question. I have a link which when clicked shows a div. If the user blurs off that link the div is hidden. This is good, but I don't want the div to be hidden if the user clicks on it. So if the user clicks anywhere other than the link or div itself only then should the div be hidden. Right now my code doesn't do this.</p>

<p>JSFiddle:</p>

<p><a href="http://jsfiddle.net/gTkUG/" rel="nofollow">http://jsfiddle.net/gTkUG/</a></p>

<p>jQuery:</p>

<pre><code>$('#myLink').click(function(e) {
    $('#myDiv').show();
    e.preventDefault();
});
$('#myLink').blur(function() {
    $('#myDiv').hide();
});
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div style="display:none;width:100px;height:100px;border:1px solid red" id="myDiv"&gt;&lt;/div&gt;

&lt;a href="" id="myLink"&gt;Click Me&lt;/a&gt;
</code></pre>

<p>So I guess the question is, how to detect blur on two or more events instead of just one?</p>
