// tabs-head切换 $(".tabs-head ul li").click(function () { let index = $(this).index(); if (index != 0) { $(this).siblings().removeClass("active"); $(this).addClass("active"); $(".container").hide(); $(".container") .eq(index - 1) .show(); } });