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

    Hi! Can’t cope with the problem – removing titles.
    Tried many ways, but the solution is partial

    This removes titles only in list of galleries

    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘a’).removeAttr(‘title’);
    jQuery(‘img’).removeAttr(‘title’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_tooltip’);

    I want also remove titles from single gallery post, what should I do?

    #1088354

    Hey Eru_Code_Master,

    Adjust to this:

    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘a’).removeAttr(‘title’);
    jQuery(‘img’).removeAttr(‘title’);
    jQuery(‘.av-masonry-image-container’).removeAttr(‘title’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_tooltip’);

    Best regards,
    Jordan Shannon

    #1088424

    Nothing changed =(

    #1088778

    Hi,

    Please provide admin info so we can log in and look into this issue further.

    Best regards,
    Jordan Shannon

    #1088783
    This reply has been marked as private.
    #1089649

    Hi Eru_Code_Master,

    Thanks for giving us admin access.
    I have modified the code to:

    function add_custom_script(){
    ?>
    <script>
    window.addEventListener('DOMContentLoaded', function() {
    	var elems = document.querySelectorAll('a,img,.av-masonry-image-container');
    	for(var i = 0; i < elems.length; i++) {
    		elems[i].removeAttribute('title');
    		
    	}
    }, false )
    </script>
    <?php
    }
    add_action('wp_head', 'add_custom_script');

    Best regards,
    Nikko

    #1089932

    Great work, Nikko! Thank you very much, magician =)

    #1090187

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Remove "Titles" when mouse is hovering’ is closed to new replies.