Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Hide The Divi Image Title Tooltip That Appears On Hover

Nelson Miller Profile Orange
In this tutorial I will show you how to hide the small Divi image title tooltip that appears when you hover your mouse over images.

▶️ Please watch the video above to get all the exciting details! 👆

Add jQuery Snippet To Hide Image tooltip In Divi

This tutorial is much shorter than most, simply because there is no reason for it to be longer. The way this works is by adding a jQuery snippet to your website, which will target the image attribute element that appears when you hover over an image and remove it. There are several locations you can add the code, which will depend on your preferences, and these are explained also in the information toggle.

Where To Paste The jQuery Code

1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the jQuery tab in the custom code window in the Divi Visual Builder.

2. Child Theme
If you are using a child theme, paste this code into the scripts.js file (don't forget to remove the <script> tags at the beginning and end). If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.

3. Divi Theme Options Integration
Otherwise, paste this code in your Divi>Theme Options>Integrations tab in the "Add code to the < head > of your blog" code area.

If you need help understanding where to paste the code, please check out our complete guide about where to add custom code In Divi.

<script>
    jQuery(document).ready(function($) {
        $("img").mouseenter(function() {
            let $pac_da_title = $(this).attr("title");
            $(this).attr("pac_da_title", $pac_da_title);
            $(this).attr("title", "");
        }).mouseleave(function() {
            let $pac_da_title = $(this).attr("pac_da_title");
            $(this).attr("title", $pac_da_title);
            $(this).removeAttr("pac_da_title");
        });
    });
</script>
Hide Image Title Text Tooltips On Hover using the Divi Assistant plugin

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

2 Comments

  1. Canton Becker

    I’ve used this solution before, but I’ve also tried this CSS snippet and it *appears* to work and is much easier. Any reason not to use this instead of the JS?

    /* Hide image titles on hover, unless they’re inside of something with a ‘showTitle’ class */
    img { pointer-events:none; }
    .showTitle img { pointer-events:auto; }

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

0

Your Cart