how to get jquery onClick event on elements when they contain eachother
<p>i have a div that contains a table</p>

<pre><code>&lt;div id="container"&gt;
&lt;table id="data"&gt;
&lt;tbody&gt;
......
......
&lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p>i have bindind the onclick event on table rows so that if the user clicks a row, it is highlighted</p>

<pre><code>$("#data tr").mouseup(function() {

        $("tr.selected").removeClass("selected");// Deselect currently selected rows
        $(this).addClass("selected");       
        });
</code></pre>

<p>now if the user clicks somewhere outside the table, i want to deselect the row. the problem is if i bind the click event with the div, both the table and the div gets the callback...how can i only get a callback for the div? so that i can deselect the rows!! i even tried binding the onClick with the body element but it luks like if u bind an event with an element, all the elements inside it will get the callback. if thats the case how can i deselect the rows then if user clicks outside the bounds of table.</p>
