Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1180276

    Hi guys,

    Would like to know how to disable the masonry gallery links from my enfold website. I’ve tried some CSS with :

    {pointer-events : none} and it works well but it remove the hover effects.

    In order to still get the hover, I’ve tried some jquery from Mike, in my functions.php (child-theme), none of them are working because of the issue “ReferenceError: Can’t find variable: jQuery” :

    function remove_masonry_link(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘#top.page-id-184 a.av-masonry-entry’).removeAttr(‘href’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘remove_masonry_link’);

    ===================================== AND THE OTHER ONE :

    function remove_link_redirect(){
    ?>
    <script>
    (function($){
    $(document).ready(function(){
    $(‘#top.page-id-184 .av-masonry-entry’).click(function(event){
    event.preventDefault();
    });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘remove_link_redirect’);

    Do you know why it’s not working, and “Load jQuery in your footer” is disable ?

    Best regards

    #1180390

    Hey manyfl2or,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

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