This with a problem, when I get a number inside a span by javascript I try to convert it to int with parseInt, but nothing. For if I try to make a sum with another number it ends up concatenated. and if I convert with parseInt it will appear 'NAN'.
HTML:
<div id="qualquer"><span>5</span></div>
Javascript with Jquery:
numeroRecuperado = parseInt($('#qualquer span').text().replace(/[\d]/g, ''));
numeroQualquer = 5;
total = numeroRecuperado + numeroQualquer;
$("#qualquer span").text(total);
As a result it appears NAN.