1
我在網站上工作,客戶希望能夠訪問網站上每個其他頁面的服務頁面上的動態內容,但下面的代碼使其顯示第一個列表中的「div」,而不是被點擊的錨。從另一個頁面訪問動態內容
$(document).ready(function()
{
//hide the all div except first one
$('.msg_body:not(:first)').hide();
//when the anchor is clicked content opens like shutter
$("a.linkclass").click(function()
{
$('.msg_body').hide("slow");
$($(this).attr("href")).show("slow");
});
});
該網站是www.quantumrenovations.net
太謝謝你了Yanick。它完美的作品! – 2011-03-25 21:53:40
很高興聽到它!不要忘記點擊「檢查」標記接受這個答案。 :) – 2011-03-25 22:05:32