Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1462975

    Hi,
    my problem is the following:
    I removed the title attribute according to your documentation (https://kriesi.at/documentation/enfold/image/#remove-image-alt-title-on-hover) , to avoid showing the title on hover.
    But in the lightbox I’d like to have an image caption (which is normally the title).
    Is there a possibility to remove only “normal” image titles but not the one’s from the lightbox?
    Thanks for help.

    Best regards,
    Vera

    #1462977

    you can use instead this snippet to remove the titles:

    function temporary_removal_title_tags(){
    ?>
    <script>
      window.onload = function() {
          var links = document.querySelectorAll('a, img, *[title]');
          for (var i = 0; i < links.length; i++) {
              var link = links[i];
              link.onmouseover = function() {
                  this.setAttribute("data-tooltip", this.title);
                  this.title = "";
              };
              link.onmouseout = function() {
                  this.title = this.getAttribute("data-tooltip");
              };
              link.onmousedown = function() {
                  this.title = this.getAttribute("data-tooltip");
              };
          }
      };
    </script>
    <?php
    }
    add_action('wp_footer', 'temporary_removal_title_tags');

    but a lot of enfold elements have a choice for showing instead of the title f.e. the description.

    #1462982

    Hi Guenni007,

    thank you for your immediate reply.
    That works fine.

    Best regards,
    Vera

    #1462995

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.