https://cnodejs.org/topic/56ef3edd532839c33a99d00e 前端资源

tab切换 2

function tabs(tabtit,tabcnt){
tabtit.each(function(index){
$(this).on('click',function(){
var tindex=index;
$(this).addClass('active').siblings().removeClass('active');
tabcnt.eq(tindex).show().siblings().hide();
});
});
}

//调用

tabs($(".friendLink_nav li"), $(".friendLink_con ul"));

posted @ 2016-03-24 11:38  乐淘淘zzxh  阅读(147)  评论(0)    收藏  举报