注册 登录 充值会员 退出
毕业设计 PHP源码
充值

jQuery可伸缩时间轴代码timeline插件

作者/代码整理:  (转载请附加本文地址,带有“懒人原生”字样的谢绝转载) 发布日期:2017-08-05
jQuery可伸缩时间轴代码timeline插件
timeline插件是一款非常简洁实用的jQuery时间轴插件,jQuery可伸缩时间轴代码。


js代码

<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript">
   $(function(){
    //隐藏所有子栏目(除第一个栏目外)
	$(".year:not(:first)").find(".month").hide();
	//点击大栏目
	  $(".year>li").click(function(){
		  $("li.active",$(this).parent()).removeClass("active");
		  $(this).addClass("active");
		  $("ul>li:first",this).addClass("active");		  		  
	  });
	  $(".month>li").click(function(){
		  var $ul=$(this).parent();		  
		  $ul.find(".active").removeClass("active");		  
		  $(this).addClass("active");
          return false;		  
	  });
   });
	  
</script>