JSFiddle - React, Tailwind, and code Playground
HTML
<select id="custome_vara" name="data[item][custome_vara]" size="1">
<option value="" id="custome_vara_" selected="selected">alb</option>
<option value="20" id="custome_vara_20">stejar auriu</option>
<option value="30" id="custome_vara_30">moreiche</option>
</select>
<div>
<span class="hikashop_product_price_full" id="hikashop_product_price_full">
<span class="hikashop_product_discount">-10%</span>
<span class="hikashop_product_price hikashop_product_price_0 hikashop_product_price_with_discount">51,34 €</span>
</span>
</div>
JavaScript
function priceNew(val) {
var discountedPrice = $('.hikashop_product_price_with_discount');
var percentOff = $('.hikashop_product_discount');
var price = discountedPrice.text().split(' ');
var decimalPrice = price[0].replace(',', '.');
var eyy = parseFloat(decimalPrice) * val / 100 + parseFloat(decimalPrice);
eyy = eyy.toFixed(2);
var newPrice = eyy + ' ' + price[1];
discountedPrice.text(newPrice);
percentOff.text('-' + val + '%');
$('.hikashop_product_price').text(newPrice);
}
$('#custome_vara').one('change', function() {
priceNew($(this + 'option:selected').val());
});