欢迎您  本站地址:   jQuery仿美团外卖APP订餐购物车代码-小库平台

小库平台

 找回密码
 立即注册
jQuery仿美团外卖APP订餐购物车代码-小库平台

小库平台

 找回密码
 立即注册
上一主题 下一主题

jQuery仿美团外卖APP订餐购物车代码

跳转到指定楼层
楼主
|只看大图 回帖奖励 |倒序浏览 |阅读模式

jQuery仿美团外卖APP订餐购物车代码,一款简洁实用的手机微信端外卖网站系统购物车结算页面源码。

js代码
<scripttype="text/javascript">
$(function(){
//加的效果
$(".add").click(function(){
$(this).prevAll().css("display","inline-block");
varn=$(this).prev().text();
varnum=parseInt(n)+1;
if(num==0){return;}
$(this).prev().text(num);
vardanjia=$(this).next().text();//获取单价
vara=$("#totalpriceshow").html();//获取当前所选总价
$("#totalpriceshow").html((a*1+danjia*1).toFixed(2));//计算当前所选总价

varnm=$("#totalcountshow").html();//获取数量
$("#totalcountshow").html(nm*1+1);
jss();//<spanstyle='font-family:Arial,Helvetica,sans-serif;'></span>改变按钮样式
});
//减的效果
$(".minus").click(function(){
varn=$(this).next().text();
varnum=parseInt(n)-1;$(this).next().text(num);//减1vardanjia=$(this).nextAll(".price").text();//获取单价
vara=$("#totalpriceshow").html();//获取当前所选总价
$("#totalpriceshow").html((a*1-danjia*1).toFixed(2));//计算当前所选总价

varnm=$("#totalcountshow").html();//获取数量
$("#totalcountshow").html(nm*1-1);
//如果数量小于或等于0则隐藏减号和数量
if(num<=0){
$(this).next().css("display","none");
$(this).css("display","none");
jss();//改变按钮样式
return
}
});
functionjss(){
varm=$("#totalcountshow").html();
if(m>0){
$(".right").find("a").removeClass("disable");
}else{
$(".right").find("a").addClass("disable");
}
};
//选项卡
$(".con>div").hide();
$(".con>div:eq(0)").show();

$(".left-menuli").click(function(){
$(this).addClass("active").siblings().removeClass("active");
varn=$(".left-menuli").index(this);
$(".left-menuli").index(this);
$(".con>div").hide();
$(".con>div:eq("+n+")").show();
});
});
</script>



下载
回复

使用道具 举报

小黑屋|小库平台

GMT+8, 2024-9-20 21:33 , Processed in 0.064383 second(s), 13 queries , Xcache On.

Powered by Discuz! 3.4

小库提示

扫描下方二维码,访问手机版。