Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1076247
    Valerio
    Participant

    Hi,
    I have the following code in my Customizer > Custom Javascript
    It was used to apply two different colours to the logo, and it stopped working after the last X update.
    How can I fix, please?

    Thanks,
    Valerio

    
    jQuery( function($) { 
    
    $('.x-brand.text').each( function(){
    
    var logo_parts = $ ( this ).text().trim().split(' ');
    
    $( this ).html ( '<span class="part1">' + logo_parts[0] + '</span> <span class="part2">' + logo_parts[1] + '</span>'  );
    
    } );
    
    } );
    
    #1076252
    Valerio
    Participant

    I just noticed that TABS on my homepage are not clickable.
    Because I have this in my Customizer > Custom Javascript:

    
    jQuery( function($) {
    
    $(document).on('click', '.x-accordion-toggle, .x-nav-tabs .x-nav-tabs-item a', function( e ){
    $('html, body').stop();
    });
    
    });
    

    I assume the problem is with my Customizer??

    Please note that I have:
    1 updated X
    2 updated Cornerstone
    3 Cleared All Cache

    Thanks

    #1076398
    Paul R
    Moderator

    Hi,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1076407
    Valerio
    Participant
    This reply has been marked as private.
    #1076864
    Jade
    Moderator

    Hi Valerio,

    There are some JS errors in the console that might be caused by a third party plugin conflict. Please try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Let us know how it goes.

    #1077678
    Valerio
    Participant

    Hi,

    I found the following code, that you suggested in the past, in my child theme’s function.php:

    
    add_action('wp_footer', 'enqueue_lightbox_script');
    function enqueue_lightbox_script() {
    echo '<script type="text/javascript" src="' . home_url() . '/wp-content/plugins/cornerstone/assets/dist/js/site/vendor-ilightbox.min.js"></script> <script> jQuery(document).ready(function(){jQuery(".gallery-icon a").iLightBox({skin: "light",linkId: "gallery-image",overlay: {opacity: 0.875,blur: true},styles: {prevScale: 0.75,prevOpacity: 0.75,nextScale: 0.75,nextOpacity: 0.75},path: "horizontal",controls: {thumbnail: false}});}); </script>';
    }
    

    So the problem were fixed by adjusting the path to ilightbox.min.js which have changed since the last X update (i guess).

    from:
    /wp-content/plugins/cornerstone/assets/js/dist/site/vendor-ilightbox.min.js

    to:
    /wp-content/plugins/cornerstone/assets/dist/js/site/vendor-ilightbox.min.js

    This may be useful to others too.

    Cheers,
    Valerio

    #1077802
    Paul R
    Moderator

    Hi Valerio,

    Glad you were able to figure it out.

    Have a nice day!

  • <script> jQuery(function($){ $("#no-reply-1076247 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>