title: How to append Div after some clases in Jquery
body: <p>This is my html code where is want to append div. I want to append div after (.row-table) last child. I am new in jquery i think i am doing something wrong.</p>
  
  <pre><code>&lt;div class="details-box-table"&gt;
  
      &lt;div class="row-table"&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;S.No&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Amount&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Mode&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Bank Name&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Date&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Remarks&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Action&lt;/label&gt;&lt;/div&gt;
      &lt;/div&gt;
  
  &lt;div class="row-table"&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;1&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;2000&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Cash&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;UT Bank&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;02/03/2017&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Remarks&lt;/label&gt;&lt;/div&gt;
          &lt;div class="rTableHead"&gt;&lt;label for="Traveldate"&gt;Notngin&lt;/label&gt;&lt;/div&gt;
      &lt;/div&gt;
  
  
  
  
  &lt;div&gt;I want to append here new div after last class"row-table"&lt;/div&gt;
  </code></pre>
  
  <p>Here is the Jquery code. </p>
  
  <pre><code>$(document).ready(function(){
  
      var max_fields      = 10; //maximum input boxes allowed
      var wrapper         = $(".details-box-table"); //Fields wrapper
      var add_button      = $("#add_field_button"); //Add button ID
  
      var x = 1; //initlal text box count
      $(add_button).click(function(e){ //on add input button click
          e.preventDefault();
          if(x &lt; max_fields){ //max input box allowed
              x++; //text box increment
              $(wrapper).children(".row-table").last().after('&lt;div&gt;&lt;input type="text" name="mytext[]"/&gt;&lt;a href="#" class="remove_field"&gt;Remove&lt;/a&gt;&lt;/div&gt;'); //add input box
          }
      });
  
      $(wrapper).on("click",".remove_field", function(e){ //user click on remove text
          e.preventDefault(); $(this).parent('div').remove(); x--;
      })
  });
  </code></pre>