我正在尝试让 Foundation 6 的 Off-canvas 功能发挥作用。在这一点上,我现在正试图让 Zurb 自己的示例从他们的文档 ( http://foundation.zurb.com/sites/docs/off-canvas.html#complete-example ) 中工作。
当我打开画布的按钮被点击时,什么也没有发生。没有滑动,没有褪色,什么都没有。
我已经检查过它foundation.js
是否包含在页面中。我可以看到事件处理程序绑定到按钮。
想法?提前致谢!
HTML 源代码:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home | LearnLojban</title>
<link href="https://fonts.googleapis.com/css?family=Merriweather:700,700i|Pangolin|Signika&subset=latin-ext" rel="stylesheet">
<link rel="stylesheet" href="static/styles/styles.css" />
</head>
<body>
<div class="off-canvas position-left" id="offCanvas" data-off-canvas>
<!-- Close button -->
<button class="close-button" aria-label="Close menu" type="button" data-close>
<span aria-hidden="true">×</span>
</button>
<!-- Menu -->
<ul class="vertical menu">
<li><a href="#">Foundation</a></li>
<li><a href="#">Dot</a></li>
<li><a href="#">ZURB</a></li>
<li><a href="#">Com</a></li>
<li><a href="#">Slash</a></li>
<li><a href="#">Sites</a></li>
</ul>
</div>
<div class="off-canvas-content" data-off-canvas-content>
<button type="button" class="button" data-toggle="offCanvas">Open Menu</button>
</div>
<script src="static/js/vendor/jquery.js"></script>
<script src="static/js/vendor/what-input.js"></script>
<script src="static/js/vendor/foundation.js"></script>
</body>
</html>