title: How to append before last li in dropdown list
body: <p>I am using the following form builder (<a href="http://dontlink.me/formbuilder/" rel="nofollow noreferrer">http://dontlink.me/formbuilder/</a>) and making lots of changes to it to work the way I want.</p>
  
  <p>One of the things I want it to do is when you add a new form field, I want that form field to be placed at the bottom of the list... At the moment they are placed at the top.</p>
  
  <p>This is the code that adds the new li to the list... I've simplified it down to the part that actually does the adding...</p>
  
  <pre><code>var result = '&lt;li&gt;The new form field code goes here....&lt;/li&gt;';
  var into = $("#form_builder_panel ol");
  $(into).prepend(result);
  </code></pre>
  
  <p>For some reason by default they add an "li" tag into the code and give it a class of 'last-child'.</p>
  
  <pre><code>&lt;div id="form_builder_panel"&gt;
  &lt;form method="post" action="preview.php" class="fancy"&gt;
  
      &lt;fieldset class='sml'&gt;
          &lt;legend&gt;Built Form&lt;/legend&gt;
          &lt;ol&gt;
              &lt;li class="last-child"&gt;&lt;/li&gt;
          &lt;/ol&gt;
      &lt;/fieldset&gt;
  </code></pre>
  
  <p>Now I tried changing that third line of code to  the following:</p>
  
  <pre><code>$(into).append(result);
  </code></pre>
  
  <p>But that then puts the 'last-child' li at the top and the script stops working...</p>
  
  <p>So my question is, how do I make it so that it appends a new li to the list but adds it above the 'last-child' li?</p>
  
  <p>Hopefully I am making sense :)</p>