I was tried to copy paragraph content when I click on it, I wrote this code but it's not working correctly
here the code:
$('p').click(function (e) {
e.preventDefault();
var $temp = $("<input>");
$temp.val($(this).html()).select();
document.execCommand("copy");
$temp.remove();
});