title: How to add select2 js in wordpress admin side theme options
body: <p>I have added Select2 js to provide search capabilities in my wordpress theme setting drop down options to add search -> <a href="http://nimb.ws/1QW6id" rel="noreferrer">http://nimb.ws/1QW6id</a> </p>
  
  <p>I have added the following code to my admin options file:</p>
  
  <pre><code>&lt;?php if(is_admin()) { ?&gt;
  
  &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" /&gt;
  
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
    $(document).ready(function($) {
      $('.option-tree-ui-select').select2();
  });
  &lt;/script&gt;
  
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>On the admin side this works, but the code conflicts with the admin side media menu. The media menu continuously loads and does not allow the uploading of new images. When I remove the new code, the media functionality begins to work appropriately.</p>
  
  <p>Any ideas on how to fix this?</p>