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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:53:50+00:00 2026-05-14T20:53:50+00:00

I have an (unordered)list (generated by a repeater) of items. However, I’d like to

  • 0

I have an (unordered)list (generated by a repeater) of items. However, I’d like to show the first three items, and have the rest hidden by the main content div. When a button is pressed, I would like the list’s div to expand, pushing the main content div down and showing the rest of the list. I was thinking of using slideDown(), but that closes the entire div ( and I would like to show the first 3 items of the list). What would be the best way to achieve an effect like this? Is there a plugin that can easily show X items of a list and the display the rest upon request?

Thanks

edit: Adding current code:

   <div id="name_links">
        <asp:Repeater ID="rptName" runat="server">
        <ItemTemplate>
        <ul class="ul_links">
        <li>

        <a id="aName"  runat="server" href=<%# Eval("Name")%> >
    <%# Eval("Name")%> 
      </a>

        </li>
        </ul>
        </ItemTemplate>
        </asp:Repeater>
    </div>

<div id="main_content" >
...
</div>

I’ve tried to add this JQuery, but it doesn’t seem to pick up any of the links:

    $("ul.ul_links").each(function() {
        $(this).children("li:gt(3)").hide();

        alert("Testing"); //This never gets called. 
    });
  • 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-14T20:53:50+00:00Added an answer on May 14, 2026 at 8:53 pm

    You item template looks wrong

    It should be

     <div id="name_links">
         <ul class="ul_links">
        <asp:Repeater ID="rptName" runat="server">
        <ItemTemplate>
        <li>
    
        <a id="aName"  runat="server" href=<%# Eval("Name")%> ><%# Eval("Name")%> 
      </a>
    
        </li>
        </ItemTemplate>
       </asp:Repeater>
      </ul>
    </div>
    

    Then jquery will be able to show and hide as desired.

    The other way you were creating sets of ul -> li tags .

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

Sidebar

Related Questions

I have an unordered list whose list items are displaying inline. However, its layout
I have an unordered list like this: <div class=blueBoxMid> <ul> <li>First item <em>This is
So I have an unordered list with some list-items. I want to show and
I have a unordered list <ul id=images > . There are 3 list items
I have an unordered list in the footer of my html doc. The first
I have an unordered list which contains several items called 'oListItems' the UL has
I have a generated unordered list (ul). Later on the page I have a
I have a unordered list: <ul id=sortable> <li id=1 class=ui-state-default>First <a href='#' title='delete' class=itemDelete>x</a></li>
I have an unordered list like so: <ul class=foo> <li id=asdf> <span class=indexnumber></span> <span
I have a unordered list like the one below: <ul id=tabs> <li><a href=#tab1>latest news</a></li>

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.