title: Mimicking modern browsers' copy url using jQuery (add http:// when copied)
body: <p>I'm trying to mimic modern browsers' "copy url" functionality.</p>
  
  <p>When viewing the url you don't see the <code>http://</code>. If you copy it to the clipboard, <code>http://</code> will be added. So far I have this: </p>
  
  <pre><code>$('#address input').bind('copy', function() {
    $.fn.changevalue = function (v) {
      return $(this).val(v).trigger('change');
    }
    var origval = $(this).val();
    $(this).changevalue('http://' + origval);
  });
  </code></pre>
  
  <p>This adds the <code>http://</code> to the input field, if action 'copy' is detected but it stops the copy to clipboard. The function also adds <code>http://</code> to main input field, that I don't want. I just want to add it to clipboard.</p>