"Copy Link" Button (Elementor Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024

ความคิดเห็น • 13

  • @PastorWagner
    @PastorWagner 8 หลายเดือนก่อน +1

    Thank you!

  • @snapran
    @snapran ปีที่แล้ว +2

    Thanks Alot!

  • @ralphberk2583
    @ralphberk2583 6 หลายเดือนก่อน +1

    Thanks, very useful!

  • @Stason775
    @Stason775 2 หลายเดือนก่อน +1

    Thank you! This code works great on pages. How do I run this code in Popup Elementor?

    • @WickyDesign
      @WickyDesign  2 หลายเดือนก่อน +1

      Awesome! Running JavaScript in Elementor popups don't work very well. I use the JetPopup plugin to run JavaScript inside Elementor popups:
      crocoblock.com/plugins/jetpopup/?ref=2562

  • @caldayham
    @caldayham 7 หลายเดือนก่อน +1

    thank you!

  • @thepartydude
    @thepartydude ปีที่แล้ว +1

    Hey thanks! How can I do this, but instead of just copying the URL, they can share that URL like when you wanna share it on Mobile (so they can choose between of sharing it on Whatsapp, Facebook, Instagram, etc)

  • @qinpra
    @qinpra 4 หลายเดือนก่อน

    Hey Mark, want to ask. I have 5 contents displayed through listing grid and it was created using jetengine CustomContentType. In the listing template, I applied your approach in this video. so all 5 listings have that copytoclipboard button. But, all the button only copying one text only instead of copying the text on each listings. Am I missing something or this approach on the video designed not for a listing?

  • @memeslapshorts
    @memeslapshorts ปีที่แล้ว +3

    how to make this button just copy a text ? please answer😊

    • @jonwars123
      @jonwars123 ปีที่แล้ว

      Also looking to copy just the text thanks

    • @Stason775
      @Stason775 2 หลายเดือนก่อน +1

      const copyBtn = document.getElementById('copyURL');
      copyBtn.addEventListener('click', () => {
      const textToCopy = "YOUR TEXT";
      navigator.clipboard.writeText(textToCopy).then(() => {
      alert('Text copied successfully!');
      }).catch(() => {
      alert('Error copying text to clipboard');
      });
      });

  • @fa7849
    @fa7849 ปีที่แล้ว

    I want, after copying, a popup for the visitor to go to this site or not. can you do that please?

    • @WickyDesign
      @WickyDesign  ปีที่แล้ว

      Thanks for the tip! The updated code should now give a popup asking if they want to redirect to the copied URL.
      const copyBtn = document.getElementById('copyURL');
      copyBtn.addEventListener('click', () => {
      const url = window.location.href;
      navigator.clipboard.writeText(url).then(() => {
      const confirmation = window.confirm('URL copied to clipboard. Do you want to go to the copied URL?');
      if (confirmation) {
      const newWindow = window.open(url, '_blank');
      newWindow.focus();
      } else {
      // Close the popup or perform any other desired action
      // For example, you can clear the clipboard:
      navigator.clipboard.writeText('');
      }
      }).catch(() => {
      alert('Error copying URL to clipboard');
      });
      });