The issue you have is that you need to amend a Node, not the text content of an Element object.
To achieve this you need to loop over every label
and get its contents()
. Given your HTML structure you can then get the last node within the content and use a regular expression to remove any characters which are not relevant to the price you want to display. Try this:
$('li label').each(function() {
var node = $(this).contents().last()[0];
node.textContent = node.textContent.replace(/[^€d,]/g, '');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li>
<label>
<input type="radio" onchange="mollie_forms_recurring_methods_624();mollie_forms_624_totals();" data-frequency="months" data-freq="iedere maanden" data-pricetype="fixed" data-price="10.00" data-vat="" name="rfmp_priceoptions_624" value="1">
/ (€ 5,00 iedere maanden)
</label>
</li>
<li>
<label>
<input type="radio" onchange="mollie_forms_recurring_methods_624();mollie_forms_624_totals();" data-frequency="months" data-freq="iedere maanden" data-pricetype="fixed" data-price="10.00" data-vat="" name="rfmp_priceoptions_624" value="1">
/ (€ 10,00 iedere maanden)
</label>
</li>
<li>
<label>
<input type="radio" onchange="mollie_forms_recurring_methods_624();mollie_forms_624_totals();" data-frequency="months" data-freq="iedere maanden" data-pricetype="fixed" data-price="10.00" data-vat="" name="rfmp_priceoptions_624" value="1">
/ (€ 250,00 iedere maanden)
</label>
</li>
</ul>