-
AuthorPosts
-
January 28, 2016 at 12:29 pm #769185
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 ); } );
January 28, 2016 at 12:32 pm #769193This reply has been marked as private.January 28, 2016 at 9:07 pm #769813Hi 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!
January 30, 2016 at 8:39 am #771964Thanks,
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
January 30, 2016 at 8:36 pm #772517Hello 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.
January 31, 2016 at 2:18 am #772719OK, 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?
January 31, 2016 at 10:18 am #773036Hi there,
We can’t give any exact ETA about that right now. You can check our Changelog for update.
Thanks for your patience.
February 14, 2016 at 6:35 am #795004Hi 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
February 14, 2016 at 6:37 am #795007This reply has been marked as private.February 14, 2016 at 6:41 am #795013Sorry, resolved.
There was custom JS added to the other post that was interfering…
February 14, 2016 at 6:58 am #795031Actually, 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.
February 14, 2016 at 7:57 pm #795658Hello 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.
February 14, 2016 at 8:12 pm #795676Hi 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.
February 15, 2016 at 1:28 am #795976Thanks!
I’ll look into that later today and let you know how it goes.
kind regards, Tristan
February 15, 2016 at 1:54 am #796008No Problem Tristan.
Please let us know then.If you need any other concern, please don’t hesitate to open another thread.
-
AuthorPosts