Tagged: 

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

    The below code is not working anymore to hide the title attribute on hover of image.

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

    You can see it when hovering over the images in featured listings gallery

    #1047288

    Hey,

    Pleases replace your code with following one

    function remove_title_attr(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('#wrap_all a').removeAttr('title');
    jQuery('#wrap_all img').removeAttr('title');
    jQuery('#wrap_all div').removeAttr('title');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');

    Best regards,
    Yigit

    #1047294

    perfect, that worked. thanks.

    #1047295

    Hi!

    You are welcome! Let us know if you have any other questions or issues :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hide title attribute on hover not working’ is closed to new replies.