基础 5 显示模式不起作用

foundation 5 reveal modal not working(基础 5 显示模式不起作用)
本文介绍了基础 5 显示模式不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

祝大家今天好,

我正在为我的迷你项目使用基础 5.我想使用框架的显示/模式功能.但是好像不行.

I'm using foundation 5 for my mini project. I want to use the reveal/modal feature of the framework. But it seems it does not work.

index.html

<!DOCTYPE html>
<html>
<head>
    <title>Job Posting</title>
    <link rel="stylesheet" type="text/css" href="../css/normalize.css">
    <link rel="stylesheet" type="text/css" href="../css/foundation.min.css">

    <script type="text/javascript" src="../js/vendor/custom.modernizr.js"></script>
</head>
<body>
  <a href="#" class="button" data-reveal-id="myNormal">click</a>
  <div class="reveal-modal" id="myNormal">
      Modal
      <a class="close-reveal-modal">x</a>
  </div>
   <script src="../js/vendor/jquery.js"></script>
   <script src="../js/foundation/foundation.js"></script>
   <script src="../js/foundation/foundation.reveal.js"></script>
   <script>
      $(document).foundation();
   </script>
</body>

我很确定浏览器加载了 js,因为它在调试器中没有显示任何错误.而且我知道它在我遗漏的代码中的某个地方,但自从我遇到这个已经有几个小时了.任何帮助将不胜感激.

I'm pretty sure that the browser loaded the js as it does not show any error in the debugger. And I know it's somewhere in the code that I left out but it's been a couple of hours since I ran into this. Any help would be much appreciated.

推荐答案

你可能忘记了 data-reveal :

<div class="reveal-modal" id="myNormal" data-reveal>

这篇关于基础 5 显示模式不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

how to remove this error quot;Response must contain an array at quot; . quot;.quot; while making dropdown(如何删除此错误quot;响应必须在quot;处包含数组。创建下拉菜单时(Q;))
Why is it necessary to use `document.createElementNS` when adding `svg` tags to an HTML document via JS?(为什么在通过JS为一个HTML文档添加`svg`标签时,需要使用`Document.createElementNS`?)
wkhtmltopdf print-media-type uses @media print ONLY and ignores the rest(Wkhtmltopdf print-media-type仅使用@media print,而忽略其余内容)
price depend on selection of radio input(价格取决于无线电输入的选择)
calculate price depend on selection without button(根据没有按钮的选择计算价格)
What should I consider before minifying HTML?(在缩小HTML之前,我应该考虑什么?)