Tagged: x
-
AuthorPosts
-
May 3, 2016 at 5:24 am #910467
micheleParticipantHi, I noticed that my one page navigation on mobile is not in line properly, – I was advised to add this code to custom css, but unfortunately it hasn’t worked.
.x-btn-navbar {
margin-top: 50px;
}Thank you in advance
MicheleMay 3, 2016 at 5:25 am #910471
micheleParticipantThis reply has been marked as private.May 3, 2016 at 8:25 am #910697
ChristopherModeratorHi there,
Please add this code in Customize -> Custom -> JavaScript :
jQuery(document).ready(function($) { function belowMastheadArrow() { var $body = $('body'); var $bodyHeight = $body.outerHeight(); var $adminbarHeight = $('#wpadminbar').outerHeight(); var $navbarHeight = $('.x-navbar').outerHeight(); var scrollSpyLinks = $('.x-nav-scrollspy > li > a[href^="#"]'); if ($(window).width() <= 979) { scrollSpyLinks.off('click'); scrollSpyLinks.click(function(e) { e.preventDefault(); var $contentBand = $(this).attr('href'); $('html, body').animate({ scrollTop: $($contentBand).offset().top + 1 }, 850, 'easeInOutExpo'); }); } else { scrollSpyLinks.off('click'); scrollSpyLinks.click(function(e) { e.preventDefault(); var $contentBand = $(this).attr('href'); $('html, body').animate({ scrollTop: $($contentBand).offset().top - $adminbarHeight - $navbarHeight + 1 }, 850, 'easeInOutExpo'); }); } } belowMastheadArrow(); $(window).resize(belowMastheadArrow); });Hope it helps.
May 4, 2016 at 12:42 am #911932
micheleParticipantHi Christopher, I added the code, but the mobile navigation is still off a bit- sorry.
Michele
May 4, 2016 at 6:48 am #912296
ChristianModeratorCan you give us more details by what you mean by “a bit off”. A video recording would be a great help.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-910467 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
