jquery: trying to get value of text field .onfocus()
<p>I am building a calculator for a home-buyer. Each time the user enters a number in the field the final purchase price gets updated.  There are a few fields that actually take 6x the variable out of the total purchase price.  I would like the 6 month calculations to only show up after that particular field is entered. </p>

<p>Currently t works, but does not calculate the correct amount.  However if you tab back into the text field and text out he calculator works correctly.  The final purchase price calculates correctly every time.</p>

<p><a href="http://coyle.webedgemedia.com/Admin/BidSheet/47" rel="nofollow">http://coyle.webedgemedia.com/Admin/BidSheet/47</a></p>

<p><a href="http://jsfiddle.net/webedge/7fyV5/" rel="nofollow">http://jsfiddle.net/webedge/7fyV5/</a> (The CSS isn't coming through correctly, but you can get the understanding of what is happening)</p>

<p>I am certain it has something to do with the DOM not knowing the value when I tab out of it, but I thought the .on() function would have helped solved that.  Any help is appreciated.</p>

<pre><code>$('.currency').on("blur", function () {

    var purchasePrice = 0;
    var futureSalesPrice = $('#txtFutureSales').length &gt; 0 ? $('#txtFutureSales').val().replace("$", "").replace(",", "") : 0;
    var purchaseLoan = $('#txtPurchaseLoan').length &gt; 0 ? $('#txtPurchaseLoan').val().replace("$", "").replace(",", "") : 0;
    var remodeling = $('#txtRemodeling').length &gt; 0 ? $('#txtRemodeling').val().replace("$", "").replace(",", "") : 0;
    var utilities = $('#txtUtilities').length &gt; 0 ? $('#txtUtilities').val().replace("$", "").replace(",", "") : 0;
    var HOADues = $('#txtHOADues').length &gt; 0 ? $('#txtHOADues').val().replace("$", "").replace(",", "") : 0;
    var Insurance = $('#txtInsurance').length &gt; 0 ? $('#txtInsurance').val().replace("$", "").replace(",", "") : 0;
    var Taxes = $('#txtTaxes').length &gt; 0 ? $('#txtTaxes').val().replace("$", "").replace(",", "") : 0;
    var LoanInterestCarry = ('#txtLoanInterestCarry').length &gt; 0 ? $('#txtLoanInterestCarry').val().replace("$", "").replace(",", "") : 0;
    var Inspection = $('#txtInspection').length &gt; 0 ? $('#txtInspection').val().replace("$", "").replace(",", "") : 0;
    var SaleTitle = $('#txtSaleTitle').length &gt; 0 ? $('#txtSaleTitle').val().replace("$", "").replace(",", "") : 0;
    var RealEstateSales = $('#txtRealEstateSales').length &gt; 0 ? $('#txtRealEstateSales').val().replace("$", "").replace(",", "") : 0;
    var ProjectedProfit = $('#txtProjectedProfit').length &gt; 0 ? $('#txtProjectedProfit').val().replace("$", "").replace(",", "") : 0;

    utilities = utilities * 6;
    HOADues = HOADues * 6;
    Insurance = Insurance * 6;
    Taxes = Taxes * 6;
    LoanInterestCarry = LoanInterestCarry * 6;

    $('.currency').formatCurrency();

    purchasePrice = futureSalesPrice - purchaseLoan - remodeling - Insurance - utilities - HOADues - Taxes - LoanInterestCarry - Inspection - SaleTitle - RealEstateSales - ProjectedProfit;

    $('#txtUtilities').on("blur", function () {
        $('.utilitiesMonthly').text(utilities).formatCurrency();
    });

    $('#txtHOADues').on("blur", function () {
        $('.hoaMonthly').text(HOADues).formatCurrency();
    });

    $('#txtInsurance').on("blur", function () {
        $('.insuranceMonthly').text(Insurance).formatCurrency();
    });

    $('#txtTaxes').on("blur", function () {
        $('.taxesMonthly').text(Taxes).formatCurrency();
    });

    $('#txtLoanInterestCarry').on("blur", function () {
        $('.loanInterestCarry').text(LoanInterestCarry).formatCurrency();
    });

    $('.price').text(purchasePrice).formatCurrency();

});
</code></pre>
