jQuery issues with .each()
<p>Is there any reason why this function beginning:</p>

<pre><code>$(".inner").each(function() {
</code></pre>

<p>Would fail to process every div with the class <code>inner</code> in a page full of:</p>

<pre><code>&lt;div class="inner"&gt;
</code></pre>

<p>?</p>

<p>That is my main question.  I've pretty much debugged for the last 24 hours and I've come to the conclusion that the jQuery function is not even processing at every place it should.  This was my simple test:</p>

<pre><code>$(function() {
    $(".inner").each(function() {
        var inner = $(this);
        var plusMore = $("&lt;div&gt;HELLO!!!&lt;/div&gt;");
        plusMore.insertBefore($(inner));
    });
});
</code></pre>

<p>On identical code lines inside of a table, I only get this code to function (and view "HELLO!!!") on a handful of the table rows.  I just cannot understand it...</p>

<p>----<strong>UPDATE FOR HTML/SMARTY</strong>----</p>

<pre><code>&lt;td&gt;
    {if $results[i].people}
        &lt;div class="outer peoplecol"&gt; 
            &lt;div class="inner"&gt;
                {foreach from=$results[i].people item=people}
                    &lt;div style="line-height:12px; margin-bottom:10px;"&gt;
                        {if $people.pending eq 0}
                            &lt;a href="Editpeople.php?tid={$people.id}" title="People Details" style="text-decoration:none"&gt;
                        {/if}
                        {$people.firstName} {$people.lastName}
                        {if $people.pending eq 0}
                            &lt;/a&gt;
                        {/if}
                    &lt;/div&gt;
                {/foreach}
            &lt;/div&gt;
        &lt;/div&gt;
    {else}
        &lt;div class="outer peoplecol"&gt;
            None
        &lt;/div&gt;
    {/if} 
&lt;/td&gt;
</code></pre>

<p>Also - I'm using jQuery TableSorter with this.  I just tried disabling, and it worked, so it must be clashing with this...!</p>

<p><strong>---UPDATE ADDING TABLE SORTER CODE----</strong></p>

<pre><code>$(document).ready( function () {
    // TableSorter
    if ($("#dt-results").find("tbody").find("tr").size() &gt; 0)
    {
        $("#dt-results") 
        .tablesorter({
                        widgets: ['zebra'], 
                        sortList: [[0,1]],
                        headers: { 
                            1: { 
                                sorter:'currency' 
                            }
                        },              
                        textExtraction: function(node) {
                            if ($(node.innerHTML).hasClass('outer') &amp;&amp; $(node.innerHTML).hasClass('peoplecol')) {
                                if ($.trim($(node).text()) == 'None') {
                                    return 'z'; //so that none comes last
                                }
                            }
                            return $(node).text();
                        }
        })
        .tablesorterPager({container: $("#pager")})
        .tablesorterFilter({filterContainer: $("#filter-box"),
                      filterClearContainer: $("#filter-clear-button"),
                      filterCaseSensitive: false,
                      filterWaitTime: 10});
    }

});
</code></pre>
