Remove all characters after a comma with jQuery -
i remove characters after "," in string using jquery, targeting class of element. other solutions found using javascript, targeting string instead of class.
my code is:
<td class="priceinfo">€779,34 </td>
how remove characters after "," in text of td element?
you can use jquery's text()
method achieve this:
$('.priceinfo').text(function(i, t) { return t.substr(0, t.lastindexof(',')); });
Comments
Post a Comment