title: Working with jQuery add row button click - jQuery AJAX PHP
body: <p>I'm trying to call a text box (or a set of div with input fields) with a button click (id: add_row)</p>
  
  <p>The below code works for the first time, but not the second time.</p>
  
  <p>In other words - the add button works and brings the text box for the first time, not the second time. I need the add button to work for 'n' times.</p>
  
  <p>Also is it possible to give dynamic value for input name (i.e percent0, percent1, addr0 and addr1) so that i can post the values to the next page.</p>
  
  <p>Thanks,
  Kimz</p>
  
  <h1>Partial Code</h1>
  
  <pre><code>    &lt;script src="jquery-1.11.0.min.js"&gt;&lt;/script&gt;    
      &lt;script type="text/javascript"&gt;
          $(document).ready(function(){
              $("#add_row").click(function(){
              $("#addr1").show();
          });
      });
      &lt;/script&gt;
  </code></pre>
  
  <h1>HTML Code</h1>
  
  <pre><code>&lt;table&gt;
      &lt;tr id='addr0'&gt;
          &lt;td&gt;&lt;input type="text" name='percent0'  placeholder='Percentage' /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr id='addr1' style="display:none"&gt;
          &lt;td&gt;&lt;input type="text" name='percent1'  placeholder='Percentage' /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;a id="add_row" class="btn btn-default pull-left"&gt;Add Percentage&lt;/a&gt;        
  </code></pre>
  
  <p>Here is the full code(JSFIDDLE):
  <a href="http://jsfiddle.net/4mP9U/1/" rel="nofollow">http://jsfiddle.net/4mP9U/1/</a></p>