可以't开始使用放大弹出模式弹出
Can't get started with modal popup using magnific popup
我已经阅读了Magnific Popup的文档,包括了这些文件,并根据以下内容从模式弹出中复制和粘贴了代码Js报价
<a class="popup-modal" href="#test-modal">Open modal</a>
<div id="test-modal" class="mfp-hide white-popup-block">
<h1>Modal dialog</h1>
<p>You won't be able to dismiss this by usual means (escape or click button), but you can close it programatically based on user choices or actions.</p>
<p><a class="popup-modal-dismiss" href="#">Dismiss</a>
</p>
</div>
$(document).ready(function () {
$('.popup-modal').magnificPopup({
type: 'inline',
preloader: false,
focus: '#username',
modal: true
});
$(document).on('click', '.popup-modal-dismiss', function (e) {
e.preventDefault();
$.magnificPopup.close();
});
});
但这根本不起作用,上面的代码出了什么问题?
JsFiddle中外部加载的CSS可能有问题。尝试删除外部加载的css并将内容粘贴到css选项卡中。
相关文章:
- Javascript,访问一个主要对象模块模式中的每个对象
- 是否有任何snippet或jQuery插件可以列出easylist.txt模式匹配的DOM中的所有元素
- 试图在引导模式内动态生成图表,得到offsetWidth错误
- UIAutomation放大图像
- 同位素库错误:未捕获错误无布局模式包装生产线8
- 在DOM中查找一个模式并替换它's的内容使用jquery
- 如何缩短MongoDB ObjectId并在Mongoose模式中使用它
- D3.js模式不适用于弧形或圆环图
- Webdriver.io pageObject模式-通过传递参数来定义元素选择器
- 模块模式和这个
- 带有let的JS/EECMAScript6私有字段的模式
- 我是否可以检测到javascript正在被卸载(作为调试模式)
- 执行动态模式弹出
- 注意:wp_enqueue_script调用不正确.在 Wordpress 调试模式下
- AngularJS ui路由器html5模式中断路由
- 如何在d3上的图形中添加放大和缩小按钮
- 包含圆括号的JavaScript Regex模式
- 显示模块模式在Knockout中设置模型的新实例
- 可以't开始使用放大弹出模式弹出
- 如何加载页面加载放大弹出模式