jQuery how to get number from string? -
i have html:
<span class="price-old" style="padding: 2px;">179,00 dkk</span>
or be:
<span class="price-old" style="padding: 2px;">1.750,00 dkk</span>
how number?
try this:
parseint($('.price-old').text().replace(/[^0-9.]/g, "")); //<-- remove parseint() include value after decimal point
Comments
Post a Comment