Bootstrap 3 & Walker nav collapse problem (1 post)

  1. Andrea Garza
    Posted 2 years ago #

    This is my first try with integrating the bootstrap nav with wordpress using walker. I have it working with one exception and after 2 days of messing with it I need to ask for help before I'm completely bald.


    The first link has a dropdown on hover (the others don't have children so there is nothing under them). The problem is that when the nav collapses and you see the "menu" button .. click the menu button and it doesn't expand .. it doesn't do anything. Any wise words on how to fix this?

     $(function() {
    $('ul.nav li.dropdown').hover(function() {
        $('.dropdown-menu', this).fadeIn('fast');
    }, function() {
        $('.dropdown-menu', this).fadeOut('fast');
       <nav role="navigation" class="navbar navbar-default">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
                    <span class="sr-only">Toggle navigation</span>Menu
            <!-- Collection of nav links and other content for toggling -->
            <div id="navbarCollapse" class="collapse navbar-collapse">
    			wp_nav_menu( array(
    				'menu'       => 'top_menu',
    				'depth'      => 2,
    				'container'  => false,
    				'menu_class' => 'nav navbar-nav',
    				'fallback_cb' => 'wp_page_menu',
    				'walker' => new wp_bootstrap_navwalker())

    And in my functions.php

    require_once( get_template_directory()  . '/lib/navwalker.php');
    require_once( get_template_directory()  . '/lib/mobile-navwalker.php');

    I have also tried loading diff versions of jquery different ways and bootstrap different ways. Alas, nothing seems to fix the problem. I'm hoping its just a css thing. ANY help would be appreciated.

    [Moderator Note: No bumping, thank you.]

Topic Closed

This topic has been closed to new replies.

About this Topic