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 776955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:31:57+00:00 2026-05-14T19:31:57+00:00

I am toggling row siblings. I wrote .toggle(true) when document ready. see below picture.

  • 0

I am toggling row siblings. I wrote .toggle(true) when document ready. see below picture. I think row sibling are not availble before this function calls.

alt text

 $(document).ready(function() {

       $('tr[@class^=RegText]').hide().children('td');

        list_Visible_Ids = [];
        var idsString, idsArray;

        idsString = $('#myVisibleRows').val();
        idsArray = idsString.split(',');

        $.each(idsArray, function() {
            if (this != "") {
                $(this).siblings('.RegText').toggle(true);
                list_Visible_Ids[this] = 1;
            }
        });

alt text

alt text

How to resolve this? why sliblings are not avaible in when document is ready?

  • 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-05-14T19:31:58+00:00Added an answer on May 14, 2026 at 7:31 pm

    Your posted code doesn’t match the debugger code, your code has this, which is (almost!) correct:

    $(this).siblings('.RegText').toggle(true);
    

    The debugger has this, which is incorrect:

    $(this).siblings(('.RegText').toggle(true));
    

    You need to update whatever you’re actually debugging to that code without the extra parenthesis, otherwise you’re going to get some pretty funky behavior there.

    Also you need a # in there since your debugger shows you’re not storing the hash mark in the array, which is perfectly fine. You’re currently calling $("row10") (which looks for <row10> elements), but what you need is $("#row10") (which looks for id="row10" elements), so adjust your call like this:

    $('#' + this).siblings('.RegText').toggle(true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How could i make the toggle transition look softer? I'm toggling 2 divs: $(document).ready(function(){
I am using key shortcut to class toggling like below. // Toggle admin bar
My toggle function is only toggling through 2 of the 3 classes and not
Toggling an element and its siblings can be accomplished as: $(this).toggle(); $(this).prev().toggle(); Combining them
I am toggling 'tr.subCategory1' and its siblings .RegText . at the same time I
I had an accordion given to me that is not toggling each tab open
I'm toggling the datasource of an tableview but the indexPath.row throws me an exception
Are there any direct consequences of toggling between Unicode , MBCS , and Not
Here's JSFiddle Everything's explained there in the fiddle. Here, div is toggling below, but
I want to write a line toggling macro in Netbeans. But I'm just not

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.