mirror of
https://github.com/TrentSPalmer/fcc-challenges.git
synced 2024-11-24 20:21:30 -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();
|
|
}
|