Rails 4.2 Ruby 2.2.0
在我的布局中:
<div class="alert-box warning">
Flash message goes here
<a href="#" class="close">×</a>
</div>
但&#34; x&#34;不隐藏(或关闭)div。只需将浏览器与#39;#&#39;追加。换句话说,基金会关闭js永远不会被执行。
如何使用近距离工作链接?
答案 0 :(得分:1)
div
缺少data-alert
属性。 documentation中的示例:
<div data-alert class="alert-box">
<!-- Your content goes here -->
<a href="#" class="close">×</a>
</div>
答案 1 :(得分:0)
在基础设置中,您可以设置要单击的类以关闭模式。
$(document).foundation({
reveal: {
dismiss_modal_class: 'close'
}
});