In my code it changes the values after clicked out of text box using jQuery, But my idea is to change the value of third box copy to the fourth box without clicks out. Please have to clear that issues.
$("#home_product").on('change', '.home_product-item select, .home_product-item input', function() {
var $line = $(this).parents('.home_product-item');
var currname = $line.find('.orderbox1 option:selected').text();
var prodname = $line.find('.orderbox2 option:selected').text();
var option1 = $line.find('.orderbox1').val();
var option2 = $line.find('.orderbox2').val();
option1 *= $line.find(".orderbox3").val();
option2 *= $line.find(".orderbox3").val();
$line.find(".orderbox4").val(option1 - option2);
$line.find(".orderbox5").val(currname);
$line.find(".orderbox6").val(prodname);
0 comments:
Post a Comment