我最近上傳了我的個人作品集網站(www.edwardmanson.com),並一直試圖找到方法來保持手風琴部分中的第一個標籤(關於我)訪問該網站。jQuery手風琴 - 第一個標籤打開訪問
$(document).ready(function() {
$(".desc").hide();
$("h3.open-close").click(function(){
if ($(this).is(".current"))
{
$(this).removeClass("current");
$(this).next(".desc").slideUp(400);
}
else
{
$(".desc").slideUp(400);
$("h3.open-close").removeClass("current");
$(this).addClass("current");
$(this).next(".desc").slideDown(400);
}
});
});
注意足夠的信息,看http://jqueryui.com/demos/accordion/它說在那裏如何打開你想要的任何標籤。 -1 – Matt