.text() the parent class
<p>I am trying to change <code>.cartSubPrice</code> text to the new price provided by the JSON request. Everything else works perfectly even the total price change and I know it is returned because of firebug and just <code>alert(resultSub)</code> shows it. I just cant figure out how to tell it to go to the proper place and change. Any help would be greatly appreciated. </p>

<p>Jquery</p>

<pre><code>$('.cartUpdate').bind("keyup", function() {
    changeItem = $(this);
    var url = 'cart/update' 
    var qty = $(this).attr('value');
    var rowid = $(this).attr('name');

    if(qty &gt; 0) {
        $.post(url, {qty: qty, rowid: rowid }, function changeCost () {     

            $.getJSON('cart/updatePrice', {rowid: rowid}, function(data) {                  
                //convert to currency                                   
                resultSub = data.subTotal.toFixed(2);
                resultTotal = data.totalPrice.toFixed(2);           

                //change
                $(changeItem).parent('.cartSubPrice').text(resultSub);      
                $('.cartTotalPrice').text(resultTotal);


            });

        });
    }   

    return false;
});
</code></pre>

<p>Html</p>

<pre><code>&lt;div class="cartItem"&gt;
    Item 1
    &lt;div class="cartSubPrice"&gt;80.00&lt;/div&gt;    
    &lt;input type="text" name="76ea881ebe188f1a7e7451a9d7f17ada" value="4" class="cartUpdate" &gt;   
    &lt;a href="#" id="cartDelete" name="76ea881ebe188f1a7e7451a9d7f17ada"&gt;x&lt;/a&gt;
&lt;/div&gt;
&lt;div class="cartItem"&gt;
    Item 2
    &lt;div class="cartSubPrice"&gt;20.00&lt;/div&gt;    
    &lt;input type="text" name="e7a36fadf2410205f0768da1b61156d9" value="1" class="cartUpdate" &gt;   
    &lt;a href="#" id="cartDelete" name="e7a36fadf2410205f0768da1b61156d9"&gt;x&lt;/a&gt;
&lt;/div&gt;
</code></pre>
