1
I’m trying to do the following function:
<span id="our_price_display">R$ 71,90</span>
function calculaParcela(){
var regex = /\d+,\d+/g;
var texto = $(".our_price_display").text(); //id da div com o texto R$ 71,90
var valor = regex.exec(texto);
var insereValor = $("#valor-parcelado").text(valor.join(""));
console.log(insereValor);
var divide = insereValor / 3;
console.log(divide);
}
But on the console he returns me Nan.
what could be done to fix this operation?
Man, that’s right! Thank you very much!
– Julio Rodrigues