我有几个不同的divs,有不同的项目和名称。每个人都有一个独特的名字,我希望当用户点击一个名称时,它会将相应的页面加载到popupContainer
div中。由于某种原因,它不会打电话。带有load()的jquery弹出窗口
这是Jquery的:
$(document).ready(function(){
//Find & Open
$(".projectThumb").click(function(){
htmlName = $(this).find("img").attr("name");
$("#popupContainer").load(htmlName + ".html");
});
//Close property
$("a.close").live("click", function(){
$("#popupContainer").empty();
});
});
这是HTML:
<div id="content">
<div class="projectThumb">
<img src="/img/aeffect_button_static.gif" width="146" height="199" class="button" name="aeffect" alt="" />
<p class="title">A.EFFECT: Film Poster</p>
</div>
<div class="projectThumb">
<img src="/img/lova_button_static.gif" width="229" height="199" class="button" name="lova" alt="" />
<p class="title">Lova – Summer 07’ – Titles</p>
</div>
</div>
<div id="popupContainer"></div>
你能看到萤火虫经历的要求吗?你看到什么错误? – seth 2009-09-09 22:09:21
不,请求没有被发送。有些东西没有被正确调用。 – antonanton 2009-09-09 23:35:10
我使用完全相同的html和jQuery创建了一个页面,并且完美运行。或者至少用我在放入的相关文件中放置的虚拟文本更新popupContainer。当然,我已经实现了任何样式表。那么CSS的问题其实是相关的? – BlackMael 2009-09-10 03:05:42