After clicking on the email, I want it to copy the text to the clipboard and to show the message below.
This is what it should and looks like in the Wix preview, where everything works properly:
This is what it actually acts like after publishing:
This is my code:
// Copies the e-mail on click
$w.onReady( () =>
{
$w('#email').onClick( () => {
wixWindow.copyToClipboard("my email address")
.then( () =>
{
let fadeOptions = {
"duration": 200
};
$w("#popup").show("fade", fadeOptions);
setTimeout(()=>{
$w("#popup").hide("fade");
},2000);
});
});
});