Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #3428839
Image hover
Closed

Comments

  • Previsha started the conversation

    Hi, When I hover over the images, it gives the image name. How do I not display the name when my mouse hovers over the image.

  •  7,092
    Oliver replied

    Hi,

    Please provide link to the page with the issue

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  7,092
    Oliver replied

    Or try to add this code:

    document.addEventListener("DOMContentLoaded", function() {
        const images = document.querySelectorAll("img");
        images.forEach(image => {
            image.addEventListener("mouseover", () => {
                image.dataset.originalTitle = image.title;
                image.removeAttribute("title");
            });
            image.addEventListener("mouseout", () => {
                image.title = image.dataset.originalTitle;
                delete image.dataset.originalTitle;
            });
        });
    });

    to the custom JS field in the theme optionsĀ 

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver