Tagged: x
-
AuthorPosts
-
November 14, 2016 at 4:22 pm #1257040
barneyibbotsonParticipantI’m having issues with the mobile navigation menu in Ethos.
When viewing my site on mobile,I encounter the following problems:
1) One-page navigation works, but doesn’t scroll to the correct location on the page. It scrolls to a point below the intended location.
2) Sub-menus don’t work. When tapped, instead of the sub-menu expanding, the whole menu closes. The sub menu appears when you tap on the menu icon again. (For an example of this, see: new.flowskate.co.uk/flowshopURL is new.flowskate.co.uk
WordPress 4.5.4 running X – Child Theme theme.
X version 4.6.1November 14, 2016 at 9:15 pm #1257399
NicoModeratorHi There,
Thanks for writing in.
First, please update your setup to the latest version.
https://community.theme.co/kb/updating-your-theme-and-plugins/
Then, Check for plugin conflict,
You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
Let us know how it goes.
Thanks.
November 15, 2016 at 10:45 am #1258150
barneyibbotsonParticipantHi Nico
Thanks for the reply.
I have updated my setup and I followed the steps that you recommended.
Unfortunately the problem still persists.
Regards,
BarneyNovember 15, 2016 at 12:38 pm #1258323
JadeModeratorHI Barney,
Please try to add this code in the Custom JS of the customizer:
jQuery ( function( $ ) { $('.x-navbar .x-nav-wrap.mobile .x-nav > li > a').off('touchend touchstart click').on('click', function () { $('.x-btn-navbar').trigger('click'); var target = $(this); setTimeout( function() { $('html,body').animate({scrollTop: $( '#' + $(target).attr('href').split("#").slice(-1)[0] ).offset().top - $('.x-navbar').height() },700 ,'swing'); }, 300 ); } );Hope this helps.
November 15, 2016 at 7:11 pm #1258753
barneyibbotsonParticipantThanks for this – it has half-solved my problem.
The submenus now function correctly. However, the main menu doesn’t collapse after tapping on the menu item, which means that on pages with one-page navigation enabled, the scrolling function moves to a point that is beyond its intended location, due to (I’m guessing) the extra height of the expanded menu.Regards,
BarneyNovember 16, 2016 at 1:13 am #1259028
Paul RModeratorHi Barney,
Upon checking, I can see a syntax error in the console.
I checked your code and it’s kind of messed up.
http://screencast.com/t/HzgtZMYe
Please copy the code provided as it is.
Thanks
November 16, 2016 at 5:41 am #1259223
barneyibbotsonParticipantHi
My mistake! The code was messed up – I’d copied it from the email I received rather than from this thread. I’ve replaced it now yet the problem still persists.Barney
November 16, 2016 at 6:33 am #1259260
Paul RModeratorHi Barney,
It that case, please provide us your wordpress admin login in private reply.
Thanks
November 16, 2016 at 6:41 am #1259266
barneyibbotsonParticipantThis reply has been marked as private.November 16, 2016 at 10:10 am #1259516
JadeModeratorHI Barney,
Please add this code in the custom CSS:
@media (max-width: 979px) { .masthead { position: fixed; top: 0; z-index: 9999; width: 100%; } }Hope this helps.
November 16, 2016 at 1:04 pm #1259742
barneyibbotsonParticipantHi – thanks for the reply.
This makes the one-page navigation scroll to the correct anchors, but the menu stays expanded and covers up the content. It also makes the top widgetbar menu disappear.
Regards,
BarneyNovember 16, 2016 at 3:26 pm #1259928
JadeModeratorHi Barney,
There was a JS that was causing the issue. I went ahead and fixed it.
Kindly check.
November 16, 2016 at 6:15 pm #1260159
barneyibbotsonParticipantHi
The menu now closes itself after selecting, so that’s good. However I still have the following issues:– The navigation still doesn’t go to the right location. It’s a few pixels below the anchor. I need it to scroll to the exact top of the div.
– The page doesn’t ‘scroll’ smoothly, it jumps.
– The widgetbar menu at the top is still missing.
– The main menu navbar becomes ‘detached’ from the logo bar when you scroll down the page.(There is a gap between the logo area and the navbar through which you can see the page content scrolling, underneath.)Barney
November 16, 2016 at 9:14 pm #1260460
Rue NelModeratorHello Barney,
Thanks for updating in!
The logo and the navbar are separate and this is why they are detached when you scroll down tha page. If you want to include the logo as fixed in the navbar, please add the following JS code in the customizer, Appearance > Customize > Custom > Javascript
(function($){ $(document).ready(function(){ $('.x-logobar').prependTo( $('.x-navbar') ); }); })(jQuery);And then it’s a few pixels below the anchor because you only set 20 pixels for your navbar top height. Please go to the customizer, Appearance > Customize > Header > Navbar > Navbar Top Height (px) and set it at least 116 pixels.
Hope this helps.
November 17, 2016 at 5:08 am #1260835
barneyibbotsonParticipantHi – thanks for the suggestions.
I’m afraid none of this is helping – it’s still a mess.I still have the issue of the missing widgetbar menu at the very top, and none of the suggestions have worked.
Making the Navbar top height 116px means that I have an unnecessarily deep navbar on the desktop version, which is not what I want.
I’m not sure how to get the widgetbar back now, and the navbar still isn’t working.I also have no way of getting back to my previous code because my code was altered. I would rather you tell me which code to change rather than you alter it, just so I know which lines have been changed.
I’m beginning to panic a bit now as my site has lost some of its functionality and I don’t know how to get it back. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1257040 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
