title: How to initialize select2 dynamically
body: <p>I insert rows of concepts (with select and input text elements) in my DOM through AJAX. And I want to initialice those select to select2: but I don't know the proper way to do that.</p>
  
  <ul>
  <li>I should write the javascript in each row? (Insert html and JS through AJAX)</li>
  </ul>
  
  <p>I get this in each AJAX request:</p>
  
  <pre><code>&lt;select id="concept0"&gt; 
      &lt;option value="Test"&gt; Test &lt;/option&gt;
      &lt;option value="Test2"&gt; Test 2 &lt;/option&gt;    
  &lt;/select&gt;
  &lt;script&gt; $("#concept0").select2(); &lt;/script&gt;
  </code></pre>
  
  <p>But I think is a wrong idea to return the javascript with the HTML in my AJAX response. There are other alternative?</p>
  
  <p>Thanks and sorry if my question is a little stupid...</p>