disable selection after copying in jQuery

120
March 14, 2022, at 03:50 AM

My code to copy the text inside the field:

window.copyToClipboard = function(elementId) {
var aux = document.getElementById(elementId);
  aux.select();
document.execCommand("copy");
  alert('copy');
}
<input type="text" id="fldID" value="test">
<input type="submit" onclick="copyToClipboard('fldID');">

My problem : How to disable selection after copying?

Rent Charter Buses Company
READ ALSO
Hi everyone , I am new to jQuery and I was asked this question but I don&#39;t know how to do it

Hi everyone , I am new to jQuery and I was asked this question but I don't know how to do it

Ron recently started his carrier in developing web applicationsAs a part of his first project, he is assigned to create a web page using jQuery library

126
Importing jQuery in SvelteKit

Importing jQuery in SvelteKit

How do I import jQuery in SvelteKit (with TypeScript support)?

191
how to Use Metafiled in Jquery like using .html({{current_variant.metafields.my_fields.pack_size_m2_}}); but not working

how to Use Metafiled in Jquery like using .html({{current_variant.metafields.my_fields.pack_size_m2_}}); but not working

Hi there i want to know how to embbed Shopify Metafield in Jquery like in want to do this

145
Lightslider not working on the server but works locally on my machine

Lightslider not working on the server but works locally on my machine

apologies if this seems like a noob question but I've been struggling to get my slider work on the server just like it does locallyIts tough to find the exact problem as there are no error logs on the console

96