jquery nyroModal 只是不会显示我隐藏的 div?
我已经在我的计算机上设置了 nyroModal 的 DOM 元素(隐藏 div)示例,添加了 js 文件和样式表,但是当我单击链接显示隐藏 div 时似乎没有发生任何事情,任何人都可以建议我可能会出错的地方吗?
<!DOCTYPE html >
<link rel="stylesheet" href="styles/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.nyroModal.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/jquery.nyroModal-ie6.min.js"></script>
<![endif]-->
<script type="text/javascript">
$(function() {
$('.nyroModal').nyroModal();
});
</script>
<a href="#test" class="nyroModal">DOM Element (hidden div)</a>
<div id="test" style="display: none; width: 600px;">
<a href="demoSent.php" class="nyroModal">Open a new modal</a><br />
Test
</div>
I have set up the DOM Element (hidden div) exmplae of nyroModal on my computer adding the js files and stylesheet but when I click the link to display the hidden div nothing seems to happen, can anyone suggest where I might be going wrong?
<!DOCTYPE html >
<link rel="stylesheet" href="styles/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.nyroModal.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="js/jquery.nyroModal-ie6.min.js"></script>
<![endif]-->
<script type="text/javascript">
$(function() {
$('.nyroModal').nyroModal();
});
</script>
<a href="#test" class="nyroModal">DOM Element (hidden div)</a>
<div id="test" style="display: none; width: 600px;">
<a href="demoSent.php" class="nyroModal">Open a new modal</a><br />
Test
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
链接上有
class="myroModal"
,而不是 div。或者您需要将$('.nyroModal').nyroModal();
更改为$('.test').nyroModal();
You have the
class="myroModal"
on the link, not the div. Or you need to change the$('.nyroModal').nyroModal();
to be$('.test').nyroModal();