jquery filtering issue
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/14387503/check-whether-any-element-in-a-list-has-an-event">Check whether any element in a list has an event</a>  </p>
</blockquote>



<p>i got a bit stuck on this 
I have a table cells with different id cells i want to loop on them and check if any cell has <code>onclick</code> event must execute some code i tired much it's either all the cells response at the same time or none of them </p>

<pre><code>function loadDropComp()
{
var rows = $("#scu tr:gt(0)"); // skip the header row
rows.each(function(index) {
rows.find('td').on(click,function(){ 

$('this').html("//code");
$('this').append("code ");
$('this').append("code");
saveTable();
}); 
</code></pre>

<p>another issue  i got is the click is not define 
here is a look on my html </p>

<pre><code> &lt;table id="scu"  border="1" style="width:100%;"&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;/th&gt;
      &lt;th&gt;Lecture1&lt;/th&gt;
      &lt;th&gt;Lecture2&lt;/th&gt;
      &lt;th&gt;Lecture3&lt;/th&gt;
      &lt;th&gt;Lecture4&lt;/th&gt;
      &lt;th&gt;Lecture5&lt;/th&gt;
    &lt;/tr&gt;

    &lt;tr class="grey"&gt;
        &lt;th&gt;Saturday&lt;/th&gt;
        &lt;td onClick="loadDropComp()" id="cel1" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel2" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel3" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel4" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel5" class="dropComp" style="code" &gt; &lt;/td&gt;

    &lt;/tr&gt;
    &lt;tr class="white"&gt;
        &lt;th&gt;Sunday&lt;/th&gt;
         &lt;td onClick="loadDropComp()" id="cel6" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel7" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel8" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel9" class="dropComp" style="code" &gt; &lt;/td&gt;
         &lt;td onClick="loadDropComp()" id="cel10" class="dropComp" style="code" &gt; &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>i appreciate any help or suggestion </p>
