I'm trying to get just the numbers from these divs, so no "$" or "/BX"
<span class="SRPRef">$6.16/BX</span>
<div class="Price">$12.32</div>
I'm using this jQuery to calculate the percentage but I don't know how to grab just the integers.
var PriceReftxt = $('.Price').text();
var SRPReftxt = $('.SRPRef').text();
// CONVERT TO DECIMAL
var PriceRef = parseInt(PriceReftxt).toFixed(2);
var SRPRef = parseInt(SRPReftxt).toFixed(2);
// DO LOGIC BASED MATH
var Increase = (SRPRef - PriceRef);
var PercentIncrease = ((Increase / PriceRef) * 100).toFixed(2);
// FIND EMPTY CELL, AND PUT % NUMBER IN
$('.SavingsPercent').text("Savings: " + PercentIncrease + "%");