Hello Summer Sale!
Exclusive season-opening discount on TheGem theme.
Limited time offer.

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,280
    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,280
    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