title: Copy to Clipboard on Button Click Event, the Current URL with prepended and/or appended text in Javascript/jQuery
body: <p>The goal is to add a button that will copy the page URL and amend text to the front and end of the URL using jQuery. So far, I have:</p>
  <pre><code>$(document).ready(function () {
      $(document).on(&quot;click&quot;, &quot;#ShareButton&quot;, function (e) {
          $(&quot;body&quot;).append('&lt;input id=&quot;copyURL&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;');
          $(&quot;#copyURL&quot;).val(window.location.href).select();
          document.execCommand(&quot;copy&quot;);
          $(&quot;#copyURL&quot;).remove();            
      });
  });
  </code></pre>