Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1356109

    I Have just upgraded to 5.01 and now on my image titles do not show.

    See https://peter-test2.co.uk/all-cycling-products/. click on 4 seasons jacket and it does not show jacket title

    Can you please help

    • This topic was modified 2 years, 5 months ago by condonpb.
    #1356119

    on your page you use that ( by the way deprecated window.load is involved too ) script:

    jQuery(window).load(function(){
    	jQuery('a').removeAttr('title');
    	jQuery('img').removeAttr('title');
    });

    without the titles – the lightbox got no info what to show!
    The question now is when you inserted the script, because even in the earlier version of enfold this could not work.

    Have a look into the alb you set – maybe there is the option not to use the title but f.e. description.
    Or just not to remove the title – but save it to another attribut and save back on click or on mouseout:

    can you try this instead :

    function temporary_removal_title_tags(){
    ?>
    <script>
      window.onload = function() {
          var links = document.querySelectorAll('a, img');
          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');

    btw: maybe you decide to darken the lightbox background a bit more – because the png files with the transparency will then be better seen:

    .mfp-zoom-in.mfp-ready.mfp-bg, 
    .mfp-zoom-in.mfp-ready .mfp-preloader {
      opacity: 0.9 !important;
    }
    #1356239

    Hi condonpb,

    Please follow @Guenni007’s solution.


    @Guenni007
    thanks for always helping out.

    Best regards,
    Nikko

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