Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #769185

    Tristan A
    Participant

    Hi there!

    I am opening this thread as a follow-up to this one: https://community.theme.co/forums/topic/fixed-top-navbar-no-longer-sticking/page/2/

    I had an issue with my navbar not sticking on top, on one page only /articles-2/ which is my blog page.

    This has been (temporarily) resolved, it seemed that Convertplug was preventing a JS function from running. This has been fixed, so the navbar remains sticky on that page now.

    Here is my other issue: I had custom JS to change the navbar color from transparent to white upon scrolling. However, this JS also seems to have stopped working, but on this blog page /articles-2/ only….

    How should I fix this? Now the menu is unlegible upon scrolling.

    This is the CSS code in my customizer:

    jQuery(document).ready(function($){
    	$(window).scroll(function(){
    		if ($(this).scrollTop() > 0) {
    			$('.x-navbar-fixed-top').css("background-color", "#fff");
    		} else {
    			$('.x-navbar-fixed-top').css("background-color", "transparent");
    		}
    	});
    });
    jQuery(function($) {
        $(".x-btn-navbar").on( "click touchend", function() {
        $('html, body').animate({
            scrollTop: $(".x-navbar").offset().top
        }, 1000);
    });
    });
    jQuery(function($) {
        $(".x-btn-navbar").on( "click touchend", function() {
        $('html, body').animate({
            scrollTop: $(".x-navbar").offset().top
        }, 1000);
    });
    });
    jQuery ( function($) {
    
    function re_calculate () {
    
    setTimeout( function() { //Make sure it's triggered later than masonry scripts
    $(window).trigger('resize');
    }, 300 );
    
    }
    
    $(document).ready( re_calculate );
    $(window).load( re_calculate );
    
    } );
    #769193

    Tristan A
    Participant
    This reply has been marked as private.
    #769813

    Rupok
    Member

    Hi there,

    Thanks for writing in! You can try updating the code to following :

    jQuery(document).ready(function($){
    	$(window).scroll(function(){
    		if ($(this).scrollTop() > 0) {
    			$('.x-navbar').css("background-color", "#fff");
    		} else {
    			$('.x-navbar').css("background-color", "transparent");
    		}
    	});
    });
    jQuery(function($) {
        $(".x-btn-navbar").on( "click touchend", function() {
        $('html, body').animate({
            scrollTop: $(".x-navbar").offset().top
        }, 1000);
    });
    });
    jQuery(function($) {
        $(".x-btn-navbar").on( "click touchend", function() {
        $('html, body').animate({
            scrollTop: $(".x-navbar").offset().top
        }, 1000);
    });
    });
    jQuery ( function($) {
    
    function re_calculate () {
    
    setTimeout( function() { //Make sure it's triggered later than masonry scripts
    $(window).trigger('resize');
    }, 300 );
    
    }
    
    $(document).ready( re_calculate );
    $(window).load( re_calculate );
    
    } );

    Let us know how it goes.

    Cheers!

    #771964

    Tristan A
    Participant

    Thanks,

    However…. still not working. Please note that (as I mentioned in the other thread) this used to work fine prior to the most recent X-update and plugin conflicts have been ruled out already.

    kind regards

    #772517

    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates. There is a known bug in X that the scroll events doesn’t get triggered when ConvertPlug is active. Please try to deactivate ConvertPlug and test your site. This issue has been reported already to our developers. Once they’ll place a fix for this issue, it will be updated and will be rolled out in our next update release. Please bear with us.

    Thank you for your understanding.

    #772719

    Tristan A
    Participant

    OK, thanks!

    I’ve postponed my launch date already for other reasons… But would ideally like to have this fixed prior to launch. Can you give me a rough estimate as to when that update is expected?

    #773036

    Rupok
    Member

    Hi there,

    We can’t give any exact ETA about that right now. You can check our Changelog for update.

    Thanks for your patience.

    #795004

    Tristan A
    Participant

    Hi there,

    I have something really weird. I now have the issue on some posts, but not on others….

    It is unclear to me why…. Would you mind having a quick look?

    Will provide URL’s below

    #795007

    Tristan A
    Participant
    This reply has been marked as private.
    #795013

    Tristan A
    Participant

    Sorry, resolved.

    There was custom JS added to the other post that was interfering…

    #795031

    Tristan A
    Participant

    Actually, is not resolved.

    Taking away the custom JS from the second post makes the navbar white in the preview window of Cornerstone when scrolling…. but not when viewing the post in a regular way.

    Very weird.

    please not that I did clean browser caches etc.

    #795658

    Rue Nel
    Moderator

    Hello There,

    Thanks for getting back to us. Do you have ConvertPlug installed and active? We have a known issue between X and ConvertPlug plugin where the scroll event does not trigger in the blog page and in some of the pages. Please try to deactivate this plugin and try testing your fixed navbar again.

    No need to worry because our developers is already looking into this. We also communicated with ConvertPlug plugin developers. Once we have it fixed, it will be updated and will be rolled out in our next update release. Please bear with us.

    Thank you for your understanding.

    #795676

    Lely
    Moderator

    Hi Tristan,

    I’ve checked the post and found the following error:
    Uncaught TypeError: Cannot read property ‘graphicAnimation’ of undefined
    That error prevents the javascript code from working.
    I did check each section content to see where it is coming from. I found out that the section BREAKDOWN > ROW1 content cause the issue. Please save your page as template. Then try to remove each element one by one on that specific row to see which element was causing the problem.

    Hope this helps.

    #795976

    Tristan A
    Participant

    Thanks!

    I’ll look into that later today and let you know how it goes.

    kind regards, Tristan

    #796008

    Rue Nel
    Moderator

    No Problem Tristan.
    Please let us know then.

    If you need any other concern, please don’t hesitate to open another thread.