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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:28:57+00:00 2026-05-30T13:28:57+00:00

I found this online and it works exactly as I’d like it to. However,

  • 0

I found this online and it works exactly as I’d like it to.

However, I would like to use 2 Tables of separate content, and not just one.

Is it possible to have the same ‘See 5 More’ functionality, but with 2 separate tables?

How is this achieved?

Here is the JavaScript for reference:

<script type="text/javascript">
var numShown = 5; // Initial rows shown & index
var numMore = 5; // Increment
var numRows = $('table').find('tr').length; // Total # rows

$(document).ready(function(){
 // Hide rows and add clickable div
 $('table')
  .find('tr:gt(' + (numShown - 1) + ')').hide().end()
  .after('<div id="more">Show <span>' + numMore + '</span> More</div>');

 $('#more').click(function(){
  numShown = numShown + numMore;
  // no more show more if done
  if ( numShown >= numRows ) $('#more').remove();
  // change rows remaining if less than increment
  if ( numRows - numShown < numMore ) $('#more span').html(numRows - numShown);
  $('table').find('tr:lt('+numShown+')').show();
 })

})
</script>

Many thanks for any pointers.

  • 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-30T13:28:59+00:00Added an answer on May 30, 2026 at 1:28 pm
    var numShown = 5; // Initial rows shown & index
    var numMore = 5; // Increment
    $(document).ready(function() {
        // Hide rows and add clickable div
        $('table').find('tr:gt(' + (numShown - 1) + ')').hide().end().after('<div class="more">Show <span>' + numMore + '</span> More</div>');
    
        $('.more').click(function() {
            var numRows = $(this).prev().find('tr').length; // Total # rows
            shown = $(this).prev().find('tr:visible').length + numMore;
            // no more show more if done
            if (shown >= numRows) $(this).remove();
            // change rows remaining if less than increment
            if (numRows - shown < numMore) $(this).find('span').html(numRows - shown);
            $(this).prev().find('tr:lt(' + shown + ')').show();
        });
    })​;
    

    working example:
    http://jsfiddle.net/cTuQ4/

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

Sidebar

Related Questions

Hey I found this function online and it works fine if I use it
What I found so far are some online resources like this: http://www.torsten-horn.de/techdocs/java-hibernate.htm (GER) https://www.hibernate.org/5.html
I found some code online that generally works, but I want to use it
I found this pager online, it works fine, except that when i bind the
I found this pulsing effect online and it works fine but it is set
found this function online, which works great... except I can't figure out how to
Is there a simple way of doing this I found this online and I
I found this jQuery plugin online that shows and hides divs. It's perfect for
I found this open question online. How do you process a large data file
Okay, I have done a bit of searching online and found this thread, but

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.