I'm trying to get the text element from a div
that has this content: <div class="balance"...>$500.48</div>
What I need is to get the 500.48
as a value, not a as string.
I have used alert($(".balance").text())
to check if it is returning the content and it does, but I need it to be a number. I know that if I store the string on a variable and do this:
x = $(".balance").text() ;
x = +x;
It'll convert the string into a number, so I tried to ignore the $
but I had no success.
What would be the best way to do it?