You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
814 B
JavaScript

$(function() {
//钱的数量选择
$(".select-box-soon>div:not(.price-input)").click(function(){
$(this).addClass("selectBg").siblings("div").removeClass("selectBg");
let price = $(this).text().replace("元","");
$(".price-show div span").text(price);
$(".price-input input").val("");
})
//输入金额事件
$(".price-input input").bind("input propertychange",function(event){
$(".price-show div span").text($(".price-input input").val());
$(".select-box-soon>div:not(.price-input)").removeClass("selectBg");
});
//支付方式选择
$(".way-select>div").click(function(){
$(this).addClass("wayBg").siblings("div").removeClass("wayBg");
let way = $(this).text();
$(".way-show>div>span").text(way);
})
})