title: How do I dynamically add new items to dropdown list within this form using jquery?
body: <pre><code>$(document).ready(function() {
      var element;
      $(".form-element").on("mousedown", function(event){
      element = $('&lt;form&gt;&lt;select name="dropdown"&gt;&lt;option&gt;Select...&lt;/option&gt;&lt;option value="new-dropdown"&gt;add new...&lt;/option&gt;&lt;option value="machine3"&gt;Machine 3&lt;/option&gt;&lt;option value="machine4"&gt;Machine 4&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;');
      $("#body-div").append(element);
      });
  });
  </code></pre>
  
  <p>The items in the list currently are just there for testing. But I need to be able to click on an add new option and add a new list item. </p>