title: How to repeat a section on click?
body: <p>I have this fiddle <a href="https://jsfiddle.net/74mh06v9/" rel="nofollow noreferrer">https://jsfiddle.net/74mh06v9/</a> where I am stuck on how to repeat the form group?</p>
  
  <p>This code I am using is as below;</p>
  
  <pre><code>$(function () {
          $(".repeat").on('click', function (e) {
          e.preventDefault();
          var $self = $(this);
          $self.before($self.prev('table').clone());
          });
      });
  </code></pre>
  
  <p>My HTML is </p>
  
  <pre><code>     &lt;div class="col-md-12" class="repeatable"&gt;          
          &lt;h4&gt;Invoice Details &lt;/h4&gt;
  &lt;table&gt;
      //various form groups here to repeat
  &lt;/table&gt;
      &lt;button class="repeat"&gt;Add Another&lt;/button&gt;
  </code></pre>