integer showing as NaN
<p>I'll begin with posting my javascript.</p>

<pre><code>    $(document).on('click','.remove-single-inbox-message', function(e){
    e.preventDefault();
    var messageid = $(this).data('messageid');
    var messages = $("#number-messages").html();
    var messages = parseInt(messages, 10);
    messages--;
    $.ajax({
        type: 'POST',
        url: '?a=profile_message_delete',
        data: {
            "messageid" : messageid
        },
        success: function(){
            $('.table-row'+messageid).hide();
            if(messages == 0){
                $("#insert-message-indicator").html("");
            } else {
                $("#insert-message-indicator").html("&lt;strong&gt;&lt;small&gt;"+messages+"&lt;/small&gt;&lt;/strong&gt;&amp;nbsp;&lt;i class='icon-envelope icon-white' rel='tooltip' title='New messages available'&gt;&lt;/i&gt;");
        }
        }
    });
});
</code></pre>

<p>The first decrementation works fine and the new number is displayed but the ones that follows it shows NaN. What am I doing wrong?</p>
