javascript - Bootstrap Navbar Toggle not rendering properly -


i'm building wordpress theme using bootstrap 3. when decrease screen width test navbar toggle, shown on image. figure it's wordpress problem since haven't touched bootstrap 3 files, i'm not sure. menu not rendering properly

i load css/js files using wp_enqueue_style , wp_enqueue_script

wp_register_script( 'custom-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.js'); wp_register_script( 'full-calendar', get_template_directory_uri() . '/js/fullcalendar.js'); wp_register_script( 'google-calendar', get_template_directory_uri() . '/js/gcal.js'); wp_register_script( 'main', get_template_directory_uri() . '/js/main.js'); wp_register_style( 'style', get_template_directory_uri() . '/style.css'); wp_register_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css'); wp_register_style( 'fullcalendar', get_template_directory_uri() . '/css/fullcalendar.css'); wp_register_style( 'gravityforms', get_template_directory_uri() . '/css/gravityforms.css');

// either plugin or theme, can enqueue script: wp_enqueue_script("jquery"); wp_enqueue_script( 'custom-script' ); wp_enqueue_script( 'full-calendar'); wp_enqueue_script( 'google-calendar'); wp_enqueue_script( 'main'); wp_enqueue_style('style'); wp_enqueue_style('bootstrap'); wp_enqueue_style('fullcalendar'); wp_enqueue_style('gravityforms');

my header.php looks navbar section:

        <nav class="navbar navbar-default navbar-fixed-top remove-bottom-margin" role="navigation">         <div class="container">             <!-- brand , toggle grouped better mobile display -->             <div class="navbar-header">                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">                     <span class="sr-only">toggle navigation</span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                     <span class="icon-bar"></span>                 </button>                 <a class="navbar-brand" href="<?php echo home_url(); ?>"><img src="<?php bloginfo('template_url'); ?>/img/uchurch.png"/></a>             </div>             <ul class="pull-right" id="nav-menu-mobile">                 <?php                     wp_nav_menu( array(                     'menu'              => 'primary',                     'theme_location'    => 'header-menu',                     'depth'             => 2,                     'container'         => 'div',                     'container_class'   => 'collapse navbar-collapse',                     'container_id'      => 'bs-example-navbar-collapse-1',                     'menu_class'        => 'nav navbar-nav',                     'echo'              => 'false',                     'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',                     'walker'            => new wp_bootstrap_navwalker())                     );                 ?>             </ul>             <!-- collect nav links, forms, , other content toggling -->             <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">                 <ul class="nav navbar-nav navbar-right">                 </ul>             </div><!-- /.navbar-collapse -->         </div><!-- /.container -->     </nav> 

i used wp_bootstrap_navwalker can use wordpress' menu editor change things. when first implemented it fine.

can point me in right direction can menu show in own section without having clear background (like in bootstrap 3 demo)?

i figured out, reason including wrong bootstrap.js file. once fixed that, worked!


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -