インターネットショップ。カート。カート内の商品:
name | price | count | pricecount
Car | 10usd | 2 | 20usd
count は です<input type='number' class='changecount'>
。変更する場合は、入力した数値を取り、価格を掛けて、pricecount のテキスト値を変更します。しかし、私は次のような効果でそれをやりたいです:
price = 10; count = 2; pricecount = 20; ->> change count to 3 so pricecount = 30;
pricecount changes from 20 to 30 with effect showing 21,22,23..30 (like timer)
テキストを変更しますが、効果はありません
$('.changecount').blur(function(){
var $price = $(this).parent().siblings('.gprice').text();
var $value = $(this).val();
var $pricecount = $price * $value;
$(this).parent().siblings('.gpricecount').text($pricecount);
});
JQuery でどうすればできますか?