我在我的网站上使用http://tympanus.net/Development/ModalWindowEffects/插件。我想在一个弹出窗口中使用两个关闭按钮,但只有一个正在工作,而不是两个。如何使两个关闭按钮都能正常工作。
答案 0 :(得分:0)
将class="md-close"
添加到您的范围
<span id="cda-remove" class="md-close"></span>
答案 1 :(得分:0)
两个关闭按钮弹出
<div class="md-modal md-effect-1" id="modal-1">
<div class="md-content">
<h3>Modal Dialog</h3>
<button class="md-close-custom">Close me!</button>
<div>
<p>This is a modal window. You can do the following things with it:</p>
<ul>
<li><strong>Read:</strong> modal windows will probably tell you something important so don't forget to read what they say.</li>
<li><strong>Look:</strong> a modal window enjoys a certain kind of attention; just look at it and appreciate its presence.</li>
<li><strong>Close:</strong> click on the button below to close the modal.</li>
</ul>
<button class="md-close">Close me!</button>
</div>
</div>
</div>
编写自己的jQuery函数来关闭我们的自定义关闭按钮
<script type="text/javascript">
$('.md-close-custom').click(function () {
$('.md-close').submit();
});
</script>