Code: Select all
[i]
[/i] Copy to Clipboard
/button>
Code: Select all
$(document).on("click", ".copyToClipboard", function () {
copyToClipboard("txtKeyw");
successMessage();
});
Code: Select all
function copyToClipboard(element) {
var $temp = $("");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
WEITERE INFORMATIONEN:
[*]Dies geschieht sowohl in Chrome 59 64-Bit und Firefox 54 32-Bit.
[*]
Code: Select all
successMessage()
[*]Das Hinzufügen von # vor der ID des Elements löst das Problem nicht.
< /ul>