【发布时间】:2014-06-09 01:13:24
【问题描述】:
我似乎无法让模态窗口显示来自另一个链接的任何内容。我很确定我使用了正确的类将它们链接在一起。这是http://www.ericmmartin.com/projects/simplemodal_v101/给出的基本js。
jQuery(function ($) {
// Load dialog on page load
//$('#basic-modal-content').modal();
// Load dialog on click
$(' .basic').click(function (e) {
$('#basic-modal-content').modal();
return false;
});});
我已经把基础类放到了
<li><a href="about me/about me.html" class='basic'>about me</a></li>
在外部 html 链接(关于我)中,我放了一个 div id
<div id="basic-modal-content">
<p> Darrien is an industrial & product designer based from Toronto. My creative approach falls along the line of biomimicry and human-centric design.
I've recently graduated from the University of Guelph and am currently pursuing my Masters of Industrial Design at Pratt Institute.
Feel free to contact me to just chat and don't forget to look at some of my work.
</p>
我已将我的代码包含在此 zip (http://www.4shared.com/zip/LGOb7yugba/Darrien_Website_V2.html) 中
任何帮助将不胜感激! :)
【问题讨论】:
-
在 jsfiddle 中,您需要在 extern 文件夹中包含 Css 和 Javascript 文件。另外,我没有找到任何带有基本类的 div 或带有名为 basic-modal-content 的 id 的 div。都是你的代码吗?
-
对不起。这是主页 (jsbin.com/zigetuzu/1),这是关于我的页面 (jsbin.com/dimubaku/1)。我省略了启动页面代码。我只在 mininav 下的主页上的 about me 链接上放置了基本类。
标签: javascript jquery html css simplemodal