Is it possible to have jQuery.click trigger on the top element only?
<p>I'm trying to make a site where the user can click on any element to edit it's css. I use the following to add the click function to all lis, divs and uls.</p>

<pre><code>$('li,div,ul').click(function () {  

alert(this.id); 

});
</code></pre>

<p>The problem is if I click on an li element, then I get the alert for that, and any element underneath it. (all the containers).</p>

<p>Is it possible to have only the top element trigger when clicked?</p>
