나는 현재 탭 시스템을 갖추고 있지만, 필자가 필요로하는 것과 똑같지는 않습니다. # tab2 접미사가 붙은 URL로 이동하면 내 탭 페이지로 이동하고 URL에있는 탭은 활성화 된 탭이지만 시퀀스의 첫 번째 탭은 항상 활성화되어 있습니다. URL에 무엇이 전달되고 있는지 확인하는 방법이 있으며 #tabid가있는 경우 확인하십시오. 해당 탭의 현재 탭? 내 자바 스크립트는 현재는 aswell 시간을 절약하고, aswell 자동 선택을 할 것jquery를 사용하는 탭
$(".tab_content").hide(); //Hide all content
$("ul.tabNavigation li.shortlist").addClass("active").show(); //Activate first tab (in this case second because of floats)
$(".tab_content#shortlist").show(); //Show first tab content
//On Click Event
$("ul.tabNavigation li").click(function() {
$("ul.tabNavigation li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});