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
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

4 Comments

Comments By Others

  1. Deb

    I have tried to use the jquery method alongside the “open divi gallery with any module” code as well as a standard gallery, however, the moment I hide the title, the galleries no longer work. I’ve also tried the CSS method with little success so for now I’m using a :not in the gallery page and manually removed all the image titles. This is not ideal as I would prefer to just be able to hide the titles and then also have the galleries work whether they are standard divi galleries OR a hidden gallery that opens with a button. In the site referenced, the page where I have the hidden gallery is named projects2.

    UPDATE: Disregard my previous request for support. I ended up solving the problem by using your exact jquery code to hide image titles and then added an additional bit of code to show the image alt information in place of the title or blank title if and when it exists. On the site I reference, you can see that the image titles are not displaying, the slideshows work (both the hidden on the projects2 page and the gallery masonry layout) AND when I’ve added specific alt text (like on the projects2 page), that DOES show for the user. I think I had faulty jquery code before and now that I’m using yours, it works great! Thanks for all you do and instruction you provide!!!

    Reply
  2. 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

Shopping cart0
There are no products in the cart!
You may be interested in…
$19.00$22.50

Select options This product has multiple variants. The options may be chosen on the product page

$16.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$16.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$19.00$24.00

Select options This product has multiple variants. The options may be chosen on the product page

$20.50$24.00

Select options This product has multiple variants. The options may be chosen on the product page

Graphic showcasing Divi Assistant features and toolset.
From: $69.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Divi Search Helper Plugin By Pee Aye Creative
From: $29.00 / year

Select options This product has multiple variants. The options may be chosen on the product page

Continue shopping
0