8768 sujets

Développement web côté serveur, CMS

Bonjour,

J'ai un méga menu yamm bootstrap qui fonctionne très bien.
Cependant j'aimerais y ajouter un menu responsive via drawer.min.js et iscroll.js
Je ne comprends pas comment y récupérer les infos du menu existant...
Merci d'avance pour votre aide.
ST



/************header.php********************/

  <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
	    <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
       
                <button type="button" class="navbar-toggle drawer-toggle drawer-hamburger" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
      				<span class="sr-only">toggle navigation</span>
      				<span class="drawer-hamburger-icon"></span>
    		   </button>
      
				
				<a href="<?php echo home_url(); ?>">
			  <img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="Logo"  title="<?php bloginfo('name'); ?>" class="logo-img">
			</a>
				
            </div>
            
<!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="navbar-collapse">
                <ul class="nav navbar-nav navbar-right list-unstyled noneunderline">
                         
        
        <?php
    wp_nav_menu( array(
        'menu'              => 'primary',
        'theme_location'    => 'primary',
        'depth'             => 5,
        'container'         => 'div',
        'container_class'   => 'collapse navbar-collapse',
        'container_id'      => 'bootstrap-navbar-collapse-1',
        'menu_class'        => 'nav navbar-nav yamm',
        'fallback_cb'       => 'Yamm_Nav_Walker_menu_fallback',
        'walker'            => new Yamm_Nav_Walker())
    );
?>
			  </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>


/*********************footer.php**********************/

<script>
$(document).ready(function() {
  $('.drawer').drawer();
});
</script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/iScroll/5.2.0/iscroll.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/drawer/3.2.2/css/drawer.min.css"></script>

/**************end footer*******************/