나는 탭을 클릭했을 때 탭이 선택되었음을 보여주기 위해 위로 이동 한 탭 연결 행을 만들었습니다. 다른 탭을 클릭하면 현재의 "위로"탭이 "아래로"상태로 돌아가고 새 선택된 탭이 "위로"변경됩니다.Jquery 탭 탐색
간단한 프로세스입니다. 마지막 탭을 클릭 할 때까지 작동합니다. 클릭하면 클릭하여 "아래쪽"위치로 돌아 가지 않습니다.
나는 여기 JS 바이올린을 만들었습니다
다음내 jQuery를 그대로 :
$(function(){
$('a.tab-link-lower').click(function(){
var index_highest = 0;
// do this for each of the tabbed/folder links
$("a.tab-link-lower").each(function(x){
// remove any styling from all tabs when any tabbed folder is clicked
$('#tab'+x+'-lower a').css("color","#6c6a6a");
$('#tab'+x+'-lower').css("font-weight","normal").css("border-bottom","0px").css("background-image","url(http://s23.postimg.org/aunz2qnmf/folder_tab2.png)").css("margin-top","2px");
$('#tab'+$(this).attr("id")).css("display","none");
});
// add button/link decoration for clicked tab folder when clicked
$('#'+$(this).attr("id")+'-lower').css("font-weight","bold").css("background-image","url(http://s23.postimg.org/aunz2qnmf/folder_tab2_up.png)").css("color","#ff0000").css("font-size","11px").css("margin-top","-3px").css("border-bottom","1px solid #090");
// change the color of the a:link once it has been clicked
$('#tab'+$(this).attr("id")+' a').css("color","#000");
});
감사합니다,
앨런.
css 파일에서 모든 CSS를 사용하고 jQuery에서 addClass, removeClass 만 사용하면 코드가 순서대로 적용됩니다. – Vladimir