How to ignore click event when clicked on children
<p>So I have the following scenario:</p>

<pre><code>&lt;div id="block"&gt;
Sample text.
&lt;a href="#"&gt;Anchor link&lt;/a&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;
    $("#block").click(function() { alert('test'); });
&lt;/script&gt;
</code></pre>

<p>When I click anywhere inside the div, I'm getting the 'test' alert. But, I want to prevent that from happening when I click on the "Anchor link". How can I implement that?</p>

<p>Thanks</p>
