Tagged: x
-
AuthorPosts
-
May 3, 2016 at 2:47 pm #911345
Bent MParticipantHi.
Thanks for helping many times.
I am using my second menu in a sidebar here: http://www.adventuresincaring.org/giving/
My question is, can I get a similar effect of hiding the sub-menu elements (the indented ones) as is done on my Main menu? On the sidebar I see all my pages listed at once, but in my Main Menu the indentend ones only show when moused over or clicked.
?
This way it would not be such a big menu
May 3, 2016 at 11:37 pm #911873
Nabeel AModeratorHi there,
Thanks for writing in! To achieve this, first add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
.menu-item-has-children ul { display: none; }Then add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $(".menu-item-has-children").hover(function(){ $(this).children( "ul.sub-menu" ).show("fast"); }, function(){ $(this).children( "ul.sub-menu" ).hide("fast"); }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
May 4, 2016 at 6:05 pm #913383
Bent MParticipantWow.
That was painless.
It works, looks great.
I am totally impressed.
Thank you so much.May 4, 2016 at 8:54 pm #913574
Prasant RaiModeratorHappy to hear that. Feel free to ask us again. Have a great day! 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-911345 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
