首页

源码搜藏网

首页 > 网页特效 > jQuery特效 >

jQuery添加购物车复选框增加数量更新价格等功能

创建时间:2014-05-13 13:20  

jQuery添加购物车复选框增加数量更新价格等功能
jQuery添加购物车复选框增加数量更新价格等功能
效果预览 立即下载
jQuery添加购物车复选框jQuery添加购物车复选框是一款基于jquery制作的复选框全选反选取消,购物车,统计价格,统计,类似淘宝的购物车,非常不错的。
jQuery购物车全选复选框

//jquery特效制作复选框全选反选取消(无插件)
// 全选        
$(".allselect").click(function () {
$(".gwc_tb2 input[name=newslist]").each(function () {
$(this).attr("checked", true);
// $(this).next().css({ "background-color": "#3366cc", "color": "#ffffff" });
});
GetCount();
});
 
//反选
$("#invert").click(function () {
$(".gwc_tb2 input[name=newslist]").each(function () {
if ($(this).attr("checked")) {
$(this).attr("checked", false);
//$(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
} else {
$(this).attr("checked", true);
//$(this).next().css({ "background-color": "#3366cc", "color": "#000000" });
});
GetCount();
});
 
//取消
$("#cancel").click(function () {
$(".gwc_tb2 input[name=newslist]").each(function () {
$(this).attr("checked", false);
// $(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
});
GetCount();
});
 
// 所有复选(:checkbox)框点击事件
$(".gwc_tb2 input[name=newslist]").click(function () {
if ($(this).attr("checked")) {
//$(this).next().css({ "background-color": "#3366cc", "color": "#ffffff" });
} else {
// $(this).next().css({ "background-color": "#ffffff", "color": "#000000" });
}
});
 
// 输出
$(".gwc_tb2 input[name=newslist]").click(function () {
// $("#total2").html() = GetCount($(this));
GetCount();
//alert(conts);
});
上一篇:仿马可波罗左侧商品列表导航菜单
下一篇:parallax视差立体场景动画效果

相关内容

热门推荐