Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #964831

    Hello,
    When I insert an image in an image block, I usually remove the image title while hover whith this code in functions.php

    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');
    

    Since the 4.4 version, it seems it doesn’t work, how can I do ?
    Credentials below
    Tx a lot guys
    Nice day
    Marine

    #964944

    Hey newki75,

    This should still work. Please try and disable all active plugins to see if there may not be a scripting conflict.

    Best regards,
    Jordan Shannon

    #965432

    I only have my maintenance plugin. I’ve tried to desactivate it but not better.
    Please have a look on the partners logo, you can see the tag and the code is properly set up in my child theme functions.php file I guess.

    Page concerned: https://avecvous.co/confiance/
    You have my credentials below.
    (I use this feature for several sites and it works perfectly but it’s the first one I’ve upgraded with 4.4 that’s why I’m asking

    Tx guys, nice day
    Marine

    #965457

    Hi Marine,

    It’s now fixed.
    The problem was jquery was loaded in footer which you have set in Enfold > Performance, the script was loaded before jquery.
    I replaced this code:

    add_action('wp_footer', 'remove_title_attr');

    to:

    add_action('wp_footer', 'remove_title_attr', 1001);

    to add the script after all js in the footer is added.
    Let us know if you need further assistance :)

    Best regards,
    Nikko

    #966387

    OK perfect, tx Nikko !
    You can close the case.
    Nice day!

    #966566

    Hi newki75,

    Glad that we could help :)
    Feel free to comeback if you need further assistance.
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Remove image title on hover, code have changed with 4.4 ?’ is closed to new replies.