copy to clipboard

//function for copy to clipboard data
function copyToClipboard(element) {
var $temp = $(“<input>”);
$(“body”).append($temp);
$temp.val($(element).html()).select();
document.execCommand(“copy”);
$temp.remove();
$(“.copy”).html(“Copied”);
}
//function for copy to clipboard data
function tableCopy(element,id) {
var $temp = $(“<input>”);
$(“body”).append($temp);
$temp.val($(element).html()).select();
document.execCommand(“copy”);
$temp.remove();
// $(“#showAfterCopy”).show();
// $(id).html(“Copied”);
$(“#liveToast”).toast(“show”);
}
//kanha best function for copy to clipboard data

function copyNew() {
var copyTextarea = document.getElementById(“show-post-shortcode”);
copyTextarea.select();
document.execCommand(“copy”);
$(“.copy”).html(“Copied”);
}

Leave a Comment

Your email address will not be published. Required fields are marked *