jQuery alert onclick on element's child?
<p>I'm using this code to display an alert on a certain element:</p>

<pre><code>$("#resultsBox").click(function (event) {
    console.log('a');
    });
</code></pre>

<p>I want to display an alert only when you click on 'li' elements inside '#resultsBox'.</p>

<p>I'm trying to do it like this:</p>

<pre><code>$("#resultsBox li").click(function (event) {
    console.log('a');
    });
</code></pre>

<p>This is the element's #resultsBox structure:</p>

<pre><code>&lt;div id="resultsBox"&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;/li&gt;
    &lt;li&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>How can this be done?</p>
