Is it possible to replace a div element with jquery and update the dom?
<p>Hey guys quick question, I want to update the contents of a div with two new divs to take the place of the previous ones. Each new div has a unique id to take the place of the old ones. I then want any further update to use the ids of the new divs as their values instead of the original. Is this possible in Jquery? Thanks in advance for any assistance.</p>

<pre><code>var display_total = $(".display_total").attr("id");
var display_of_total = $(".display_of_total").attr("id");

var new_display_of_total = parseInt(display_of_total) + 1;
var new_display_total = parseInt(display_total) + 1;

$('.totalmessages').html('
    &lt;div class="display_of_total" id="' + new_display_of_total + '"&gt;
        Displaying ' + new_display_of_total + ' of 
    &lt;/div&gt;
    &lt;div class="display_total" id="' + new_display_total + '"&gt;'
        + new_display_total + ' messages...
    &lt;/div&gt;
');
</code></pre>

<p>(Editors note: no linebreaks in original code)</p>
