Tagged: x
-
AuthorPosts
-
September 13, 2016 at 9:30 am #1173104
thelistenerParticipantHi there! Did I mention how much I love X?????
Anyways, I was trying to find a way to make the mobile menu sticky (CLICK HERE TO SEE THE SITE I’M WORKING ON!) and found and inserted this code into the customizer:
CSS:
@media (max-width: 979px) { .x-navbar-fixed-top { position: fixed !important; background: rgb(52,152,219); }JS:
(function($){
$(‘.x-navbar .x-nav-wrap.mobile a’).click(function(){
$(‘.x-nav-wrap.mobile’).toggleClass(‘in’).css(‘height’, 0);
$(‘.x-btn-navbar’).toggleClass(‘collapsed’);
});
})(jQuery);`The problem I’m facing now is that when you click/tap on services, the menu collapses. What I need is for the submenu to appear and the menu only to collapse when someone scrolls down, or taps on an item in the submenu.
September 13, 2016 at 10:21 am #1173196
ThaiModeratorHi There,
Please remove this JS:
(function($){ $(‘.x-navbar .x-nav-wrap.mobile a’).click(function(){ $(‘.x-nav-wrap.mobile’).toggleClass(‘in’).css(‘height’, 0); $(‘.x-btn-navbar’).toggleClass(‘collapsed’); }); })(jQuery);Hope it helps 🙂
September 13, 2016 at 9:37 pm #1174235
thelistenerParticipantyou see, i tried that and what happens is that the open menu stays open if you scroll down.
I just don’t want the entire menu to collapse when you tap/select the “services” dropdown.
September 14, 2016 at 4:14 am #1174503
Paul RModeratorHi,
Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
September 15, 2016 at 2:41 pm #1177129
thelistenerParticipantPaul, no worries. I realize now removing the javascript was the right course of action. I truly appreciate your help!
September 15, 2016 at 3:04 pm #1177156
NicoModeratorFeel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1173104 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
