Foundation 6 Off-Canvas Button Won't Work

时间:2016-04-04 17:00:12

标签: zurb-foundation

I am having an issue with Foundation 6 and off-canvas. I have tested multiple imports of Foundation's full JS file and even disabled all other site javascript files. For some reason, when clicking the data toggle button, no javascript is firing to open the off canvas portion. I can manually trigger it using the console just fine. Was hoping someone could look over my HTML and see if I am missing something that wasn't included in the documents.

<div class="off-canvas-wrapper">
  <div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>

  <div class="off-canvas position-right" id="offCanvasNav" data-off-canvas>
    <ul>
      <li>Test</li>
      <li>Test</li>
    </ul>
  </div>

  <div class="off-canvas-content" data-off-canvas-content>

    <header class="site-header">
      <div class="row">

        <div class="small-10 small-order-1 medium-3 medium-order-1 columns align-middle">
          <a id="header-logo" href="<?php echo esc_url( home_url( '/' ) ); ?>">
            <img class="site-logo" src="<?php echo get_theme_mod( 'station-logo' ); ?>">
          </a>
        </div>

        <div class="small-2 small-order-2 medium-1 medium-order-3 columns nav-icon-wrap">
          <button type="button" class="button" data-toggle="offCanvasNav">Open Menu</button>
        </div>

        <div class="small-10 small-order-3 medium-8 medium-order-2 columns align-middle">
          <div class="row">
            <?php get_template_part( 'parts/header/audio-player' ); ?>
          </div>
        </div>

      </div>
      <?php get_template_part( 'parts/header/alert-bar' ); ?>
    </header>

0 个答案:

没有答案