我有幾個不同的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