0
我有一个带有选项卡的导航栏。一个标签在点击时应该变为活动状态,即css应该改变。另外以前的内容应该被隐藏和新的内容显示,但不I'ts表现得像我希望它:更改样式时显示和隐藏内容
我在做什么错?
SO需要这里的一些代码是有些JS:
$(document).ready(function(){
$('.profileSubpage:gt(0)').hide();
$(document).on('click','ul.profileTabs li',function(e){
e.preventDefault();
var number = $(this).index();
$(".profileSubpage").hide().eq((this).index()).show();
$(this).addClass("active").siblings().removeClass("active");
});
});