jQuery find and replace second one
<p>I was wondering how I would go about finding and replacing some text in a div, but i want to find and replace the second occurrence of that text. For example:"You just added a item, please remove this item" so I would like to find the second "item" and replace it with whatever text I choose.</p>

<p><strong>JS:</strong></p>

<pre><code>var compareCount = $('.compareWidget').find('.compareItem').length;

if (compareCount &gt;= 2) {
    $('.message').find('.count').text(compareCount);
    $('message').html().replace('item', 'items');
}

$('.message').slideDown("Fast");

setTimeout(function () {
    $('.message').slideUp("Fast");
}, 5000);
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;div id="alertMessage"&gt;
    &lt;div class="message"&gt;
        &lt;span&gt;You just added a item to compare, you currently have &lt;span class="count"&gt;1&lt;/span&gt; item to compare&lt;/span&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
