点击跳转页面后加上的效果

<div style="height:70px; line-height:70px; clear:both;"></div>


<style>
.v_nav{
margin: 0 auto;
}
.vf_3{
background-size: 100%;
}
.addcolor{
color:#e72a2d !important;
}
</style>
<div class="v_nav">
<div class="vf_nav">
<ul class="foot_navbar">
<!--<li> 
<a href="{:U('Index/new_index')}">
   <i class="vf_1"></i>
   <span style="color:#e72a2d ">新首页</span>
   </a>
</li>-->
<li> 
<a href="{:U('Index/index')}">
   <i class="vf_1"></i>
   <span style="color:#9e5201 ">首页</span>
   </a>
</li>
<li>
<a href="{:U('Goods/categoryList')}">
   <i class="vf_2"></i>
   <span style="color:#9e5201 ">分类</span>
  </a>
</li>
<li style="width:30%;">
<a href="{:U('Index/activity',array('type'=>1,'id'=>8))}" style="top:-21px;width: 70px;height: 70px;">
   <i class="vf_3" style="width: 70px;height: 70px;"></i>
   <!-- <span>客服</span> -->
   </a>
</li>
<li>
<a href="{:U('Cart/cart')}">
  <em class="global-nav__nav-shop-cart-num" id="cart_quantity" style="right:9px;"></em>
  <i class="vf_4"></i>
  <span style="color:#9e5201 ">购物车</span>
  </a>
</li>
<li>
<a href="{:U('User/index')}">
   <i class="vf_5"></i>
   <span style="color:#9e5201 ">我的</span>
  </a>
</li>
</ul>
</div>
</div>




<script type="text/javascript">
$(document).ready(function(){
 var cart_cn = getCookie('cn');
 if(cart_cn == ''){
$.ajax({
type : "GET",
url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
success: function(data){  
cart_cn = getCookie('cn');
$('#cart_quantity').html(cart_cn);
}
});
 }
 $('#cart_quantity').html(cart_cn);
});
$(function(){
/* 底部导航切换 start*/



$('.foot_navbar>li').each(function(){
var ImgArrs=['__STATIC__/images/mu001.png','__STATIC__/images/mu002.png','__STATIC__/images/mu03.png','__STATIC__/images/mu004.png','__STATIC__/images/mu005.png'];

var cur_href=window.location.href;         


var host_href=window.location.host;                      //这个得到是www.baidu,com(类似与一个网址的这个部位)


var a_href=$(this).find('a').attr("href");


var b_href='http://'+host_href+a_href;




if(cur_href==b_href){
var index=$(this).index();
$(this).find('a>i').css('background-image','url('+ImgArrs[index]+')');

$(this).find('a>span').addClass('addcolor');
$(this).siblings().find('a>span').removeClass('addcolor');
}


});


/*底部切换 end*/
});
</script>
<!-- 微信浏览器 调用微信 分享js-->
<if condition="$signPackage neq null">
<include file="public/wx_share"/>
</if>
<!-- 微信浏览器 调用微信 分享js  end-->
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值