Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7782643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:36:21+00:00 2026-06-01T19:36:21+00:00

Is there any reason why this function beginning: $(.inner).each(function() { Would fail to process

  • 0

Is there any reason why this function beginning:

$(".inner").each(function() {

Would fail to process every div with the class inner in a page full of:

<div class="inner">

?

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:

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

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…

—-UPDATE FOR HTML/SMARTY—-

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

Also – I’m using jQuery TableSorter with this. I just tried disabling, and it worked, so it must be clashing with this…!

—UPDATE ADDING TABLE SORTER CODE—-

$(document).ready( function () {
    // TableSorter
    if ($("#dt-results").find("tbody").find("tr").size() > 0)
    {
        $("#dt-results") 
        .tablesorter({
                        widgets: ['zebra'], 
                        sortList: [[0,1]],
                        headers: { 
                            1: { 
                                sorter:'currency' 
                            }
                        },              
                        textExtraction: function(node) {
                            if ($(node.innerHTML).hasClass('outer') && $(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});
    }

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:36:23+00:00Added an answer on June 1, 2026 at 7:36 pm

    The problem was related to the way jQuery tablesorter/Pager interacted with EMPTY cells in the table. It was causing some kind of issue with the rest of the jQuery on the page. I never did figure out why exactly it caused problems – but as long as I forced characters (non-white space characters), all has been performing well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any reason this function call would not return 'result'? CREATE OR REPLACE
Is there any reason that this: function find_parent_p(x){ daddy = jQuery(x).parent(); if(daddy.attr(tagName).toLowerCase() == 'p'){
Is there any reason why this shouldn't work? [PseudoCode] main() { for (int i
Is there any reason to do use block initialization, like this: x = Observer.new
Are there any good reasons for why you would include JavaScript like this: <script
Is there any sane reason why the function String.Format in .net (for C# and
Is there any reason why JQuery would not work when used in an ASPX
Is there any reason why I should close the connection after a query or
Is there any reason why images are not being displayed if I place it
Is there any reason to use Spring MVC (or other similar frameworks) as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.