Javascript 显示Jquery模式关闭

Javascript 显示Jquery模式关闭,javascript,jquery,modal-dialog,zurb-foundation,zurb-reveal,Javascript,Jquery,Modal Dialog,Zurb Foundation,Zurb Reveal,我有一个显示模式,模式中有一个表单,当用户提交表单时,我希望模式关闭 有人能帮我查一下代码吗 我已尝试将dismissmodalclass更改为submit按钮的类 $('#modal').reveal({ animation: 'fadeAndPop', //fade, fadeAndPop, none animationspeed: 300, //how fast animtions are

我有一个显示模式,模式中有一个表单,当用户提交表单时,我希望模式关闭

有人能帮我查一下代码吗

我已尝试将dismissmodalclass更改为submit按钮的类

$('#modal').reveal({
     animation: 'fadeAndPop',                   //fade, fadeAndPop, none
     animationspeed: 300,                       //how fast animtions are
     closeonbackgroundclick: true,              //if you click background will modal close?
     dismissmodalclass: 'close-reveal-modal'    //the class of a button or element that will close an open modal
});

我接受它,因为这是你使用基金会的揭示< /P>的标记基础。 在这种情况下,我建议您实际阅读文档,如果您阅读了,您就会知道可以通过javascript打开或关闭模型

**使用java-Cookie警告触发模式的示例**

在关闭正文标签之前,包含基础的JS:< /P>

<script>
$(function() {
    var COOKIE_NAME = 'welcome_cookie';
    $go = $.cookie(COOKIE_NAME);
    if ($go == null) {
        $.cookie(COOKIE_NAME, 'This Cookie is used to remember that you have seen our cookie policy', {path: '/', expires: 6});
        $('#myModal').foundation('reveal', 'open');
    }
    else {
    }
});
</script>
还要检查文档中的事件绑定


你试过什么吗?你用的是什么模态?默认的jQuery ui是$'myProvince'。提交'reveal','close';myProvince是我使用此模式的形式
<div id="myModal" class="reveal-modal small" data-reveal>
<h2>This Site Uses Cookies.</h2>
<p class="lead">Cookie Policy.</p>
<p>To give you the best experience, this site uses cookies, By continuing to use this website you are giving consent to cookies being used. For information on cookies and how you can disable them visit <a href="">here</a></p>
<a class="close-reveal-modal">&#215;</a>
 $('#myFormModel').foundation('reveal', 'close');