作者:幸福-一路向南_654 | 来源:互联网 | 2022-12-10 13:00
我开发了我的标签,只使用jQuery而没有其他第三方插件.
jQuery(document).ready(function(){
$(".resp-tab-content").hide();
$("ul.resp-tabs-list li:first").addClass("active").show();
$(".resp-tab-content:first").show();
$("ul.resp-tabs-list li").click(function()
{
$("ul.resp-tabs-list li").removeClass("active");
$(this).addClass("active");
$(".resp-tab-content").hide();
var activeTab = $(this).find("span").attr("href");
$(activeTab).fadeIn();
return false;
});
});
ul.resp-tabs-list {
list-style: none;
background: none;
margin: 0 auto;
padding: 0;
border-bottom: solid 1px #EAEAEA;
}
.resp-tab-item {
color: #343a4e;
font-size: .875em;
cursor: pointer;
padding: 0 .6em .5em;
display: inline-block;
list-style: none;
float: left;
border-bottom: solid 1px #FFFFFF;
outline: none;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
text-transform: capitalize;
}
.resp-tab-active {
text-shadow: none;
color: #1ca0de;
border-bottom: solid 1px #3E9CCA;
padding-bottom: .5em;
}
.resp-tabs-container {
padding: 0px;
clear: left;
border-top: none;
background: none;
}
.tab-content {
margin: 1em 0 0 0;
border-bottom: solid 1px #EAEAEA;
padding-bottom: 1em;
}
- Today
- This Week
- This Month