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_discount">-10%</span>
<span class="hikashop_product_price hikashop_product_price_0 hikashop_product_price_with_discount">51,34 €</span>
</div>
JavaScript
function price(val) {
console.log(val);
var test = $('span.hikashop_product_price_full:visible').text();
console.log(test);
var test2 = test.split('%');
var test3 = test2[1].split(' ');
var test4 = test3[0].replace(',', '.');
var eyy = parseFloat(test4) * val / 100 + parseFloat(test4);
eyy = eyy.toFixed(2);
var orig = test3[0] + ' ' + test3[1];
var replaceWith = '<span class="hikashop_product_price hikashop_product_price_0 hikashop_product_price_with_discount">' + eyy + ' ' + test3[1] + '</span>';
var ett = test.replace(orig, replaceWith);
$('span.hikashop_product_price_full:visible').html(ett);
}
$('#custome_vara').one('change', function() {
price($(this + 'option:selected').val());
});