title: how to access of the first TD of the clicked TR for Onclick
body: <p>I have a table; when I click on a tr I need to change the class of the first td in that; for some reason I need to use onclick! I dont know how to pass the first td of the clicked tr or if I pass the clicked tr>I dont know how to change the class of the first td of that class;</p>
  
  <p>I have tried the following which is not woking; could you please help me in this regard?</p>
  
  <p>JSFIDDLE: <a href="http://jsfiddle.net/web_developer_888/8RF5r/2/" rel="nofollow">http://jsfiddle.net/web_developer_888/8RF5r/2/</a></p>
  
  <pre><code>&lt;table&gt;
      &lt;tr onclick="myFunction(this.id)"&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;4&lt;/td&gt;
          &lt;td&gt;5&lt;/td&gt;
          &lt;td&gt;6&lt;/td&gt;        
      &lt;/tr&gt;
  
      &lt;tr onclick="myFunction(this.id)"&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;1&lt;/td&gt;
          &lt;td&gt;2&lt;/td&gt;
          &lt;td&gt;3&lt;/td&gt;        
      &lt;/tr&gt;
      &lt;tr onclick="myFunction(this.id)"&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;7&lt;/td&gt;
          &lt;td&gt;8&lt;/td&gt;
          &lt;td&gt;9&lt;/td&gt;        
      &lt;/tr&gt;    
  &lt;/table&gt;
  
  
  function myFunction(id)
  {
   if (id.hasClass('checked')) {
              id..siblings(":first").addClass('checked');
          } else {    
              id.siblings(":first").removeClass('checked');
          }
  }
  </code></pre>
  
  <p>PS: I know my code is not right; I just need your help; I dont know how to pass the first td of the clciked tr or how to get the first td or the clicked tr if I pass the clicked tr</p>