title: How to refresh a dropdown list in JQuery without using selectmenu('refresh')?
body: <p>I want to refresh a dropdown(select) after getting response from the server. How can I do this?
  I am using jquery.js (version 2.1.3). And this is my HTML code,</p>
  
  <pre><code>&lt;div class="col-md-8"&gt;
      &lt;Select id="dd" class="form-control"&gt;
          &lt;option value="0"&gt; List &lt;/option&gt;
          {{#each listValue}}
              &lt;option value="{{value}}"&gt; {{text}}&lt;/option&gt;
          {{/each}}
      &lt;/Select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In the above code, the value of <code>listValue</code> will be obtained from the server. So, the list needs to be refreshed, if the value is changed in the server.
  I am getting the updated list from the server. But, I do not know how to update the dropdown menu. The value in the server will be updated, when a record is added. I want to refresh the dropdown when a record is added. </p>
  
  <p>To add a record, I have a button next to my dropdown. When this button is clicked, a modal will be shown to enter the value. Once the 'Add' button in the modal is clicked, the entered value will be added in the server. After successful addition of record, I am sending a HTTP request to get the updated values. </p>
  
  <p>And this is the code to get the updated values in my js file,</p>
  
  <pre><code>MyModule.responseList = function(res){
      var listValue = res.content;
      //What should I do here to refresh the dropdown with this listValue
  }
  </code></pre>
  
  <p>The listValue will be like this,</p>
  
  <p><a href="https://i.stack.imgur.com/IR3Ms.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IR3Ms.png" alt="enter image description here"></a></p>
  
  <p>The listValue contains the updated values. Now, I just want to update the dropdown with this value. 
  I have searched in google to refresh the dropdown in jQuery. Almost all the solutions suggested to use selectmenu('refresh').</p>
  
  <p>But I want to refresh the list without using <code>selectmenu('refresh')</code>, as I am not using jquery-ui.js.
  Is there any way to do this?</p>