I\'ve been trying to copy the innerContent of a to my clipboard without success:
innerContent
simple method 1)create a input 2)give style z-index -1 and it will be hide
var code = $("#copy-to-clipboard-input"); var btnCopy = $("#btn-copy"); btnCopy.on("click", function () { code.select(); document.execCommand("copy"); });
Copy