懒人之家--可能是JS网页特效代码收集最全的懒站!

jQuery仿京东商城手机端商品分类滑动切换特效

作者/代码整理:  (转载请附加本文地址,带有“懒人原生”字样的谢绝转载) 发布日期:2017-06-16
一款仿京商城东手机移动端商品图片分类导航滑动效果,jQuery商品二级分类菜单切换特效。


js代码

<script type="text/javascript">
//设置cookie
function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires="+d.toUTCString();
    document.cookie = cname + "=" + cvalue + "; " + expires;
}
function clearHistroy(){
	setCookie('ECS[keywords]', '', -1);
	document.getElementById("search_histroy").style.visibility = "hidden";
}
</script> 
<script src="js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="js/swiper-3.2.5.min.js"></script> 
<script type="text/javascript" src="js/ectouch.js"></script> 
<script type="text/javascript" src="js/jquery.json.js"></script> 
<script type="text/javascript" src="js/common.js"></script> 
<script type="text/javascript">
	$(function($){
		$('#sidebar ul li').click(function(){
			$(this).addClass('active').siblings('li').removeClass('active');
			var index = $(this).index();
			$('.j-content').eq(index).show().siblings('.j-content').hide();
		})
	})
</script>