How to replace a symbol in an input value with jQuery?

jquery

Solution

$('input:text').each(function() {
    var value = $(this).val();
    $(this).val(value.replace(/\,/i, '.'));
});

Problem

I have generated inputs with price values. Example: ``` <input type="text" value="59,00"/> ``` Now I should replace the `,` (comma) with a `.` (dot) with jQuery. I tried this but it does not work: ``` $('#inputid[value~=,]').each(function(i){ $(this).text($(this).text().replace(',','.')) }); ``` Could you help me

Original source