title: Select 2 is not working after appending through jQuery
body: <p>Select2 behaves differently while trying to add more select through jquery.</p>
  
  <p>Initially its working fine but while trying to append on click of add button its not working correctly.</p>
  
  <p>find the below code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function selectRefresh(){
      $('.select2').select2({
          tags:true,
          placeholder: "Select an Option",
          allowClear: true,
          width:'100%'
      });
  }
  $('.add').click(function(){
      $('.main').append($('.new-wrap').html());
      selectRefresh();
  });
  $(document).ready(function(){
      selectRefresh();
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/css/select2.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.7/js/select2.min.js"&gt;&lt;/script&gt;
  &lt;div class="new-wrap" style="display: none;"&gt;
      &lt;select class="form-control select2"&gt;
          &lt;option&gt;test&lt;/option&gt;
          &lt;option&gt;test&lt;/option&gt;
          &lt;option&gt;test&lt;/option&gt;
          &lt;option&gt;test&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  &lt;div class="main"&gt;
      &lt;select class="form-control select2"&gt;
          &lt;option&gt;test 1&lt;/option&gt;
          &lt;option&gt;test 2&lt;/option&gt;
          &lt;option&gt;test 3&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  &lt;button type="button" class="btn btn-primary add"&gt;Add&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>