Buy me a coffee

Click Email Item in Header – Copy to Clipboard

#1. Use this code to Custom CSS box

.mailto-link {
  position: relative;
  padding: 8px 0;

.mailto-message {
  top: 1px;
  left: 50%;
  margin-bottom: -5px;
  transform: translate(-50%, -100%);
  position: absolute;
  display: none;
  width: auto;
  white-space: nowrap;
  font-size: 12px;
  background-color: black;
  color: white;
  padding: 2px 6px;
  border-radius: 2px;
.mailto-message:after, .mailto-message:before {
  content: "";
.mailto-message:before {
  top: 100%;
  left: 50%;
  border: solid transparent;
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-color: rgba(0, 0, 0, 0);
  border-top-color: #000000;
  border-width: 4px;
  margin-left: -4px;

.mailto-link:hover .mailto-message,
.mailto-link:focus .mailto-message,
.mailto-link:focus-within .mailto-message {
  display: block;

Click Email Item In Header Copy To Clipboard 04 Min

#2. Use this code to Code Injection – Footer (or Markdown Block in Footer┬áif the plan doesn’t support Code Injection)

<script src=""></script>
$(document).ready(function() {
    // Add class to mailto link
    // Needed to separate the disabling of the default action AND copy email to clipboard

    var mailto = $('.mailto-link');
    var messageCopy = 'Click to copy email';
    var messageSuccess = 'Copied';
    mailto.append('<span class="mailto-message"></span>');
    // Disable opening your email client. yuk.
    $('a[href^=mailto]').click(function() {
        return false; 
    // On click, get href and remove 'mailto:' from value
    // Store email address in a variable. {
        var href = $(this).attr('href');
        var email = href.replace('mailto:', '');
        setTimeout(function() {
            $('.mailto-message').empty().append(messageCopy);}, 2000); 

// Grabbed this from Stack Overflow.
// Copies the email variable to clipboard
function copyToClipboard(text) {
    var dummy = document.createElement("input");
    dummy.setAttribute('value', text);;

Click Email Item In Header Copy To Clipboard 05 Min

#3. Add an email item to the Navigation

Click Email Item In Header Copy To Clipboard 01 Min

#4. Result

When hover the Email item:

Click Email Item In Header Copy To Clipboard 02 Min

When click the Email item

Click Email Item In Header Copy To Clipboard 03 Min