I have a jQuery code that works only on my local test server, but once the site is uploaded to internet and live, it does not work anymore.
My code just copies URL link into the clipboard. It looks like this:
jQuery('.hardlink').click(function()
{
var hardlink = jQuery(this).attr("data-hardlink");
navigator.clipboard.writeText(hardlink).then(function () {
alert('SOME TEXT HERE')
}, function () {
alert('SOME OTHER TEXT HERE')
});
});
Is there some kind of Apache settings that needs to be allowed so that the copy to clipboard would work?