Tagged: x
-
AuthorPosts
-
December 14, 2016 at 4:25 pm #1293398
scvizarParticipantHello, I’m working on a new website, sorry but I didn’t find a solution on the forum, so please can you help me?
I’m using Superfly menu, so I’ve hided the navbar. On the homepage (maybe will be other similar layout pages) I have a Revslider on the top, and the logobar below.
I would like that when the user scroll down, the logobar go fixed on top, with a 0.5 opacity.It’s possible?
thank you!December 14, 2016 at 4:27 pm #1293400
scvizarParticipantThis reply has been marked as private.December 14, 2016 at 9:07 pm #1293719
LelyModeratorHello There,
Thanks for writing in and giving us screenshot! 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.
December 15, 2016 at 3:30 am #1293975
scvizarParticipantThis reply has been marked as private.December 15, 2016 at 4:30 am #1294030
Paul RModeratorHi,
You can add this in Custom > Edit Global Javascript in the customizer
jQuery(function($) { var $logobar = $('.x-logobar'); $(window).scroll(function() { if ( $(this).scrollTop() >= logobarOffset() ) { $logobar.addClass('x-logobar-fixed-top'); } else { $logobar.removeClass('x-logobar-fixed-top'); } }); function logobarOffset() { return $('.x-logobar').offset().top - $('#wpadminbar').outerHeight(); } });Then add this in Custom > Edit Global CSS
.x-logobar-fixed-top { position:fixed; width:100%; top:0; }Hope that helps.
December 15, 2016 at 7:06 am #1294157
scvizarParticipantit works on desktop, but the logobar seems bigger and not centered anymore, and I would like to reduce the height a little.
it does not work on mobile.
December 15, 2016 at 7:16 am #1294164
scvizarParticipantI’ve just added
left: 50px; right: 0; opacity: 0.9;to css, the logo seems centered now. But I would like to reduce the size of the logo and the logobar.
And, I have still the problem on mobile.
December 15, 2016 at 8:13 am #1294225
Paul RModeratorHi,
I went ahead and fix it for you.
I changed js code to this.
jQuery(function($) { var $logobar = $('.x-logobar'); $(window).scroll(function() { var distance = $('.masthead').offset().top - $('#wpadminbar').outerHeight(); if ( $(this).scrollTop() >= distance ) { $logobar.addClass('x-logobar-fixed-top'); } else { $logobar.removeClass('x-logobar-fixed-top'); } }); });Kindly check on your end.
December 15, 2016 at 8:19 am #1294231
scvizarParticipantit doesn’t work well… the logo/logobar is not centered, and the height of the logobar is too big…
December 15, 2016 at 10:35 am #1294429
RupokMemberHi there,
I am not seeing such menu for your site on mobile. I am attaching a screenshot on my end which shows it’s fine.
Thanks!
December 15, 2016 at 11:04 am #1294473
scvizarParticipantThe issue is visible if you scroll down the page. Same problem on ipad
December 15, 2016 at 1:05 pm #1294603
RupokMemberHi there,
I have scrolled down but no such issue. Check attachment.
Thanks!
December 15, 2016 at 2:03 pm #1294683
scvizarParticipantplease don’t click on the menubar on the left, this is why you don’t see the error
December 15, 2016 at 2:04 pm #1294689
scvizarParticipantplease don’t click on the menubar on the left, maybe this is why you don’t see the error. I see error on the iphone and ipad.
December 15, 2016 at 5:50 pm #1294930
Rue NelModeratorHello There,
Thanks for updating in! To reduce space between the logo and menu, please add the following css code in the customizer, Appearance > Customize > Custom > CSS
body #sfm-sidebar .sfm-va-middle { vertical-align: top; padding-top: 140px; }
We would loved to know if this has work for you. Thank you.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1293398 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
