kanna18
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Yes, the owner of the site is just going to get rid of the submenus for now. Thanks for all your help though, really appreciated!
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?No… unfortunately that still doesn’t work. This menu just does not want to stay open!
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Yes, unfortunately it still doesn’t work with those settings. Is there any other code from the theme that might be helpful? All I know is we are using the css for menu option 3 which is all in a separate file. Also besides the main.js and functions.php code I found the following that seems to be related to the menu option 3 in header.php (not sure if this is useful or not):
<nav class="navbar navbar-default navbar-fixed-top <?php echo $sticky_style;?>"> <div class="content-wrapper"> <div class="row"> <div class="col-md-12"> <div class="navbar-header"> <?php if($menu_style == 3) : ?> <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar one"></span> <span class="icon-bar two"></span> <span class="icon-bar three"></span> </button> <?php else: ?> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <?php endif; ?> <?php echo $header_logo; ?> </div> <!-- /.navbar-header --> <div id="navbar" class="navbar-collapse collapse"> <?php if($menu_style == 3) : ?> <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar one"></span> <span class="icon-bar two"></span> <span class="icon-bar three"></span> </button> <?php endif; ?> <?php wp_nav_menu( array( 'theme_location' => 'header', 'container' => '', 'menu_class' => $menu_class, 'walker' => new eightytwostreet_walker_nav_menu('header', $header_logo, $menu_style) )); ?> <?php if($menu_style == 3) : ?> <?php social_links('social-icons'); ?> <?php endif; ?> </div> <!--/.nav-collapse --> </div> <!-- /.col --> </div> <!-- /.row --> </div> </nav>
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?So I tried adding it using the plugin, there were some settings that I left as below:
Linking type: internal
Where on page: header
Where in site: frontendIt is still collapsing on me. The plugin said
“If you are using the jQuery library, then don’t forget to wrap your code inside jQuery.ready() as follows:”
jQuery(document).ready(function( $ ){
// Your code in here
});So I placed the code within but still no difference. Do I have one of the settings wrong maybe?
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Ok I’ll try the plugin, thanks
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Thank you! Unfortunately its still collapsing clicking any of the items. Actually when I tried preventDefault/stopPropagation on parent item click it was still collapsing then, so not sure whats triggering the closing. I also have the full css file for this particular menu option but I’m not sure if anything in there would help.
The furthest I got was that if I add the custom class “navbar-toggle” (used in the JS above as a mobile fix) it keeps the menu open as desired but the submenu items don’t do anything when clicked.
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Ok, the menu & the options to set it are located within the header. Inside theme options for the header there is actually the option to include custom javascript there. Were you thinking something along the lines of an e.preventDefault() or stopPropagation() on click? Thanks for your quick replies btw
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?Ahh I might have changed it by accident. “Search Listings” does have the http but the rest are just #. I can remove the http. Also I should clarify, there is one parent item that leads to a page, “Contact Me”, it has no submenu items.
Forum: Fixing WordPress
In reply to: Prevent slideout from closing when clicking parent menu item?@anevins Yes I’m totally happy with that, in fact the parent items aren’t even supposed to go to pages, they are just custom links with # URL.