クリックすると上に移動して、タブが選択されたことを示すタブ付きリンクの行を作成しました。別のタブをクリックすると、現在の「上」タブが「下」状態に戻り、新しく選択されたタブが「上」に変更されます。
これは単純なプロセスで、最後のタブがクリックされるまで機能し、クリックすると「下」の位置に戻りません。
ここで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");
});
ありがとう、
アラン。