jQuery [Object object] Error
<pre><code>$('td').click(function () {
    var total = $('&lt;div id="total"&gt;&lt;/div&gt;')
    var price = +($(this).text())
    var old = +($('#total').text())
    var newPrice = (old + price)
    $('&lt;div class="notice"&gt;&lt;/div&gt;')
        .append('&lt;div class="skin"&gt;&lt;/div&gt;')
        .append($('&lt;div class="content"&gt;&lt;/div&gt;').text('Total price:' + " " + $('#total').text(newPrice)))
        .hide()
        .appendTo('#panel_two')
        .fadeIn(1000);
    $('#panel_two').fadeIn().appendTo('#windowContainer');
}
</code></pre>

<p>I get object Object error in line where I'm trying to display my newPrice (Total price:) Any ideas?</p>

<p>However this works fine:</p>

<pre><code>$(document).ready(function(){
   $('td').click(function(){
    var Price = +($(this).text());
    var Old = +($('#Total').text());
    var New = (Old + Price);
    $('#Total').text(New);
   })
})
</code></pre>
