mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-11-23 20:01:31 -08:00
8 lines
187 B
JavaScript
Executable File
8 lines
187 B
JavaScript
Executable File
function copyToClipboard(element) {
|
|
var $temp = $("<textarea>");
|
|
$("body").append($temp);
|
|
$temp.val($(element).text()).select();
|
|
document.execCommand("copy");
|
|
$temp.remove();
|
|
}
|