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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:53:36+00:00 2026-06-12T17:53:36+00:00

I have the following table <table id=table> <tr><td>Item</td></tr> <tr class=hide><td>Hidden Item</td></tr> <tr class=hide><td>Hidden Item</td></tr>

  • 0

I have the following table

<table id="table">
<tr><td>Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr><td>Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr><td>Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr class="hide"><td>Hidden Item</td></tr>
<tr><td>Item</td></tr>
</table>

on clicking on a visible row, i want to show all the immediately following hidden rows up to the next visible row. The number of hidden rows is not fixed. How can I select immediately following rows up to a specific element?

  • 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-12T17:53:38+00:00Added an answer on June 12, 2026 at 5:53 pm
    //Add a class to your visible rows if possible to replace the next selector
    $('tr:visible').click(function() {
        $('.hide').hide();
        $(this).nextUntil(':visible').fadeIn();
    });​
    

    Fiddle

    .nextUntil() Reference


    Adding a show class to the visible rows, you can add a simple toggle effect to it:

    $('.show').click(function() {
        $(this).nextUntil('.show').not('.show').fadeToggle();
    });
    

    Fiddle


    A slightly more elaborated version which toggles the clicked rows’ section and hides the rows which were previously open:

    $('.show').click(function() {
        $('.hide').not(
            $(this).nextUntil('.show').not('.show').fadeToggle()
        ).hide();
    });
    

    Fiddle

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

Sidebar

Related Questions

i have a table named item with four attribute name,code,class,value now i want to
I have the following row in a table: <tr><td>Adric cut-out</td><td><span class=quantity>0</span></td><td>worthless</td></tr> I've already got
I have the following view and table in my project, vw_get_arabia_upod_full_details arabia_upod_item_avalability_master I want
I have the following HTML (a snippet): <td class=ms-vb-title height=100%> <table class=ms-unselectedtitle onmouseover=OnItem(this) ctxname=ctx1
I have the following model: class item < ActiveRecord::Base has_one :price end class price
I have a div tag with following checkbox list <div id=checkboxDiv class=checkboxDivclass> <table id=checkBoxList
I use the following code to find a particular table, hide it then show
I have the following table <table id=invoice> <tr> <th>Quantity</th> <th>Item</th> <th><input type=button id=addnew name=addnew
I have the following table* column and class, and yet when the table is
I have the following in Entity Framework . Table - Country Fields List item

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.