title: Jquery Click Buttons Show Content
body: <p>Using Jquery,I want to show  the content on  a  element when a button is clicked.In each column there are buttons.When I click ,corresponding content should be displayed when I click on the button.</p>
  
  <p>1.This is code block</p>
  
  <pre><code>  &lt;html&gt;
       &lt;body&gt;
         &lt;table&gt;
            &lt;tr&gt;
               &lt;td&gt;&lt;div&gt;&lt;button type="button" class="addButton"&gt;
  </code></pre>
  
  <p>Show</p>
  
  <pre><code>       &lt;/table&gt;
       &lt;/body&gt;
  </code></pre>
  
  <p>2.Scripting Code </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  $(document).ready(function(){ 
    $(".addButton").click(function(event){
         var tdCount=$("#addInf.addInfo").length;
         //length of the td elements
         alert(tdCount);
  </code></pre>
  
  <p></p>
  
  <pre><code>       for(var $i=0;$i&lt;tdCount;$i++){
             alert($i);
             $(".addButton:eq(0)").hide(); 
            // $(".addButton:eq($i)").hide(); 
  </code></pre>
  
  <p>//not able to hide for ith elements</p>
  
  <pre><code>        }                                
      });     
  });  
  </code></pre>
  
  <p>My problem is first element is hidden.I want to dynamically show content of first column td and second columns td and so on //when a button is clicked and hide the button as well  Iam able to do for one td element hide and show content.But how to do it dynamically</p>