title: Jquery / How to remove a cloned table selected by a checkbox?
body: <p>I'm creating a dynamic form and I want to give the opportunity to delete a selected cloned table to the user. Each table has a checkbox with an unique ID. Here is my code :</p>
  
  <pre><code>    &lt;button class="addOffer"&gt;Add Offer&lt;/button&gt;
      &lt;button class="delOffer"&gt;Delete Offer&lt;/button&gt;
          &lt;div id=offer&gt;
          &lt;TABLE id="AC" width="400px" border="0"&gt;
                &lt;TR&gt;
                    &lt;TD class="g1"&gt;
                    &lt;INPUT type="checkbox" name="chk"/&gt;
                    &lt;/TD&gt;
                    &lt;TD class="g1"&gt;&lt;SELECT name="ACREG"&gt;
                      &lt;OPTION VALUE=""&gt;&lt;/OPTION&gt;
                      &lt;OPTION VALUE="ACA"&gt;ACA&lt;/OPTION&gt;
                  &lt;OPTION VALUE="ACB"&gt;ACB&lt;/OPTION&gt;
                  &lt;/SELECT&gt;&lt;/TD&gt;
                    &lt;TD class="g1"&gt;&lt;/TD&gt;
                    &lt;TD align=right class="g1"&gt;&lt;INPUT type="button" value="Add Pic" onClick="AddPic" /&gt;&lt;/TD&gt;
                &lt;/TR&gt;
          &lt;/TABLE&gt;
          &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      var i = 1;
      $('.addOffer').click(function() {
          var copy = $('#AC').clone();
          var formId = 'AC' + i;
          copy.attr('id', formId );
  
          $('#offer').append(copy);
          i++;  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm a bit lost for the part on how the selected checkbox can send to the function his ID when delete offer is clicked.</p>
  
  <p>Your help and suggestions are really appreciate.
  Regards,
  poy</p>