title: document.execCommand("Copy") not copying
body: <p>I am using jquery to enable a user to click on a button to copy a discount code. For some reason, <code>document.execCommand("Copy");</code> is not working at all. 
  When I <code>ctrl + v</code> to paste, nothing has gottten copied over. Could someone please help me? 
  Thank you!! </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>$(document).ready(function(){
  $('#copyBtn').click(function(){
  
    console.log("loaded")
    var copyText = $('#discountCode');
    console.log($('#discountCode').text())
    copyText.select();
    document.execCommand("Copy");
    alert("Copied the text: " + copyText.text());
  })
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"&gt;&lt;/script&gt;
  
  
   &lt;p&gt;Receive 20% discount on registration fees using the code: &lt;strong&gt;&lt;span id="discountCode"&gt;FKR2455EMSPN&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
  
   &lt;p&gt;
  To register, you will be taken to the
  SuperReturn website.
  &lt;/p&gt;
  &lt;p&gt;
  Click &lt;button id="copyBtn"&gt;here &lt;/button&gt; to copy our VIP code to your clipboard
  &lt;/p&gt;
  &lt;p&gt;
  Click &lt;a href='#'&gt;
  here&lt;/a&gt; to now be taken to the SuperReturn registration page.
  &lt;/p&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>