【发布时间】:2021-11-20 00:32:24
【问题描述】:
为什么下面的方法不起作用,我应该怎么做? 你有更好更短的方法来编写这段代码吗?
我也查看了此页面,但没有注意到: enter link description here
$(function() {
var FinalPrice;
var BasePrice = $('.woocommerce-variation-price .amount').text();
// I think the problem is here
$('.Select_plooi input[type="radio"]').on('change',function(){
var plooi=$('input[name="input_4"]:checked').val();
switch (plooi)
{
case 'Enkele':
FinalPrice=BasePrice*2;
break;
case 'Dubble':
FinalPrice=BasePrice*5;
break;
case 'Wave':
FinalPrice=BasePrice*6;
break;
}
});
$("#input_2_9").val(parseFloat(FinalPrice).toFixed(2));
});
【问题讨论】:
标签: jquery woocommerce gravity-forms-plugin gravityforms