Foundation5 Off-canvas 不工作
Foundation5 Off-canvas not working
我有一个使用 Zurb Foundation5.3.3 的 Web 应用程序,我想集成非 canvas 功能。
出于某种原因我无法让它工作,单击激活 link 时没有任何反应
请看这个http://jsfiddle.net/v1880qb7/1/
我的关闭 canvas 代码在这里:
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<a class="left-off-canvas-toggle" href="#" >Calendar</a>
<!-- Off Canvas Menu -->
<aside class="left-off-canvas-menu">
<!-- whatever you want goes here -->
<p> This is test content.</p>
<div id="flat_calendar1"></div>
<div id="flat_calendar2"></div>
<div id="flat_calendar3"></div>
<div id="flat_calendar4"></div>
<div id="flat_calendar5"></div>
<div id="flat_calendar6"></div>
<div id="flat_calendar7"></div>
<div id="flat_calendar8"></div>
</aside>
<!-- close the off-canvas menu -->
<a class="exit-off-canvas"></a>
</div>
</div>
这是因为外部资源不好。您需要文件 foundation.min.js
(link) or both of files foundation.js
(link) and foundation.offcanvas.js
(link).
来自 ZURB 基金会 documentation:
Then either load each plugin individually, or include
foundation.min.js
, which automatically loads the Foundation Core and
all JavaScript plugins.
HTML
<script src="/js/foundation.min.js"></script>
<!-- or individually -->
<script src="/js/foundation.js"></script>
<script src="/js/foundation.alert.js"></script>
<!-- ... -->
<script src="/js/foundation.dropdown.js"></script>
<script src="/js/foundation.tab.js"></script>
我有一个使用 Zurb Foundation5.3.3 的 Web 应用程序,我想集成非 canvas 功能。
出于某种原因我无法让它工作,单击激活 link 时没有任何反应
请看这个http://jsfiddle.net/v1880qb7/1/
我的关闭 canvas 代码在这里:
<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
<a class="left-off-canvas-toggle" href="#" >Calendar</a>
<!-- Off Canvas Menu -->
<aside class="left-off-canvas-menu">
<!-- whatever you want goes here -->
<p> This is test content.</p>
<div id="flat_calendar1"></div>
<div id="flat_calendar2"></div>
<div id="flat_calendar3"></div>
<div id="flat_calendar4"></div>
<div id="flat_calendar5"></div>
<div id="flat_calendar6"></div>
<div id="flat_calendar7"></div>
<div id="flat_calendar8"></div>
</aside>
<!-- close the off-canvas menu -->
<a class="exit-off-canvas"></a>
</div>
</div>
这是因为外部资源不好。您需要文件 foundation.min.js
(link) or both of files foundation.js
(link) and foundation.offcanvas.js
(link).
来自 ZURB 基金会 documentation:
Then either load each plugin individually, or include
foundation.min.js
, which automatically loads the Foundation Core and all JavaScript plugins.HTML
<script src="/js/foundation.min.js"></script> <!-- or individually --> <script src="/js/foundation.js"></script> <script src="/js/foundation.alert.js"></script> <!-- ... --> <script src="/js/foundation.dropdown.js"></script> <script src="/js/foundation.tab.js"></script>