Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1151957

    On my masonry element on the front end when I rollover and image a small box appears with some text. How do I remove these?

    #1152328

    Hey arallon,

    Those are browser default when the element contains a title.
    To remove it, add this code in functions.php (preferrably on a child theme):

    function remove_custom_tooltip(){
      ?>
        <script>
          jQuery(window).load(function(){
            jQuery('.av-masonry-image-container').removeAttr('title');
          });
        </script>
      <?php
      }
    add_action('wp_footer', 'remove_custom_tooltip');

    Hope it helps.

    Best regards,
    Nikko

    #1152487

    Thanks for that Nikko, it did not seem to take away that pop up text though…I have cleared the cache several time and have also tried on several browsers and the pop of text still show up. Please Advise

    #1153339

    Hi,
    Sorry for the late reply, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function remove_custom_tooltip(){
      ?>
        <script>
        jQuery(window).load(function(){
            jQuery('.av-masonry-entry').removeAttr('title');
          });
        </script>
      <?php
      }
    add_action('wp_footer', 'remove_custom_tooltip');

    Best regards,
    Mike

    #1153750

    Hi Mike, I added that code but the rollovers still happen. I have tried clearing the cache and several browsers…I attached some login credentials just in case.

    #1153970

    Hi,
    Thanks for the login, but it doesn’t seem to be an admin account so I can’t adjust the script. Please replace the above script with this:

    function remove_tooltip_title(){
      ?>
        <script>
    jQuery(window).load(function(){
            jQuery('.av-masonry-image-container').removeAttr('title');
          });
    </script>
      <?php
      }
    add_action('wp_footer', 'remove_tooltip_title');

    Then check again

    Best regards,
    Mike

    #1154034

    Hi Mike, Sorry I just updated that account as an admin, so feel free to login! I tried adding that code but the rollover still shows…

    #1154284

    Hi,
    Thank you for the admin access, so the issue was that the title was being added twice by to different elements, here is the updated code that I added to solve:

    
    function remove_tooltip_title(){
      ?>
        <script>
    jQuery(window).load(function(){
            jQuery('.av-masonry-entry').removeAttr('title');
    	 jQuery('.av-masonry-image-container').removeAttr('title');
          });
    </script>
      <?php
      }
    add_action('wp_footer', 'remove_tooltip_title');

    Please clear your browser cache and check.

    Best regards,
    Mike

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