Tagged: x
-
AuthorPosts
-
March 10, 2017 at 6:11 am #1401790
markw1Participantand added to custom javascript
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('body.x-navbar-fixed-top-active .x-navbar-wrap').css("height", "65px"); $('.x-navbar-inner').css("min-height", "65px"); $('.x-brand.img').css("margin-top", "11px"); $('.x-brand img').css("width", "150px"); $('.x-navbar .desktop .x-nav > li > a').css({"padding-top": "30px", "height": "65px"}); } else { $('body.x-navbar-fixed-top-active .x-navbar-wrap').css("height", "100px"); $('.x-navbar-inner').css("min-height", "100"); $('.x-brand.img').css("margin-top", "20px"); $('.x-brand img').css("width", "250px"); $('.x-navbar .desktop .x-nav > li > a').css({"padding-top": "45px", "height": "100px"}); } }); });and added following to CSS
.x-brand img { transition: all 0.3s ease; } .x-navbar .desktop .x-nav>li a { transition: all 0.3s ease; }However the nav bar height and nav link size does not shrink?
What am i doing wrong ?
March 10, 2017 at 6:12 am #1401791
markw1ParticipantThis reply has been marked as private.March 10, 2017 at 9:34 am #1401985
JoaoModeratorHi There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks
March 11, 2017 at 4:04 am #1402908
markw1ParticipantThis reply has been marked as private.March 11, 2017 at 4:04 am #1402909
markw1ParticipantFYI I am using ubermenu for the menu.
March 11, 2017 at 3:50 pm #1403311
RadModeratorHi there,
It will only work on X’s native menu, Ubermenu has it’s own and different structure. It doesn’t respond the same way native one. Please do switch to standard menu.
Thanks!
March 13, 2017 at 8:06 am #1404818
markw1Participant[RESOLVED]
Ok, I cannot remove Ubermenu, as I need the megamenu feature.
I have solved.
Fixed the Javascript to:
jQuery(document).ready(function($){ $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('body.x-navbar-fixed-top-active .x-navbar-wrap').css("height", "65px"); $('.x-navbar-inner').css("min-height", "65px"); $('.x-brand.img').css("margin-top", "11px"); $('.x-brand img').css("width", "150px"); $('.ubermenu-main').css("margin-top", "0px"); } else { $('body.x-navbar-fixed-top-active .x-navbar-wrap').css("height", "100px"); $('.x-navbar-inner').css("min-height", "100"); $('.x-brand.img').css("margin-top", "20px"); $('.x-brand img').css("width", "250px"); $('.ubermenu-main').css("margin-top", "40px"); } }); });And altered the CSS to
.x-brand img { transition: all 0.3s ease; } .ubermenu-main { transition: all 0.3s ease; }March 13, 2017 at 10:29 am #1404982
RupokMemberGlad that you are all set now. Have a nice day!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1401790 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
