title: How to use clipboard.js
body: <p>As you may surmise from this question, I'm not very good with javascript and am trying to get clipboard.js (<a href="https://clipboardjs.com/" rel="noreferrer">https://clipboardjs.com/</a>) working but can't.  I followed instructions by copying clipboard.min.js into the scripts folder and then referenced it in my html file.  Then I copied their button (and modified it a bit like this:</p>
  
  <pre><code>&lt;button class="btn" id="test" data-clipboard-text="Just because you can doesn't mean you should — clipboard.js"&gt;
      Copy to clipboard
  &lt;/button&gt;
  </code></pre>
  
  <p>In their setup instructions, they say this:  </p>
  
  <p>"Now, you need to instantiate it by passing a DOM selector, HTML element, or list of HTML elements."</p>
  
  <pre><code>new Clipboard('.btn');
  </code></pre>
  
  <p>so then I made an event listener like this:</p>
  
  <pre><code> $('#test').click(function() {
              var clipboard = new Clipboard('#test');
          });
  </code></pre>
  
  <p>But I don't know what I'm supposed to do with the clipboard variable once it's created.  Or have I missed the point on what I'm supposed to do entirely?</p>