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;


#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);;


#3. Add an email item to the Navigation


#4. Result

When hover the Email item:


When click the Email item


Ask me a question, free

If your site is private or in trial, just setup password and share url. See how to:
Please check your email carefully. Recently I got a lot of questions with wrong emails.

If you haven't heard from me within 24 hours please check your junk/spam folder