Tagged: x
-
AuthorPosts
-
May 29, 2016 at 11:42 pm #1015998
speesterParticipanthttps://community.theme.co/forums/topic/jquery-sticky-header-that-shrinks-when-scrolling-down/
I follow above and added into css and java script. i edited the values and now it looks great on desktop but on mobile. After i scroll the menu button is centralise but before scroll its not in the center, its nearer to the top. How can i make before scroll also center.
My settings
Mobile Navbar Button Size (px)
18Mobile Navbar Button Alignment (px)
10Custom CSS
=========.x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand, .x-navbar .x-navbar-inner {
-webkit-transition: height 2s, padding-top 2s;
transition: height 2s, padding-top 2s;
}.x-navbar .desktop .x-nav > li > a, .x-navbar .x-brand {
-webkit-transition: min-height 2s;
transition: min-height 2s;
}
.x-navbar.x-navbar-fixed-top .desktop .x-nav > li > a {
height: 50px;
padding-top: 20px;
}.x-navbar.x-navbar-fixed-top .x-brand {
width: 90px;
}.x-navbar.x-navbar-fixed-top .x-navbar-inner {
min-height: 50px;
}javascript
==========
jQuery(function($) {$(window).scroll(function(){
if($(this).scrollTop()<=0) {
$(‘.x-navbar’).removeClass(‘x-navbar-fixed-top x-container-fluid max width’);
}});
});
May 29, 2016 at 11:45 pm #1016000
speesterParticipantThis reply has been marked as private.May 29, 2016 at 11:46 pm #1016001
speesterParticipantMay 30, 2016 at 12:23 am #1016022
ChristopherModeratorHi there,
Please change
Mobile Navbar Button Alignment (px)value to 16px.Hope it helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1015998 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
